TortoiseSVN with ssh setup

Hello,
after some struggeling with wrapper v2 (not working for me) i have success with ssl+ssh via linux .
What is not working for me is on the windows side.
Connection via putty and certifactes works, plink seems ok and logging inside sshd says connection succesfull but then tortoise aborts with :
Checkout from svn+ssh://rhodecode@svn.xxx.xx/Administration/Test, revision HEAD, Fully recursive, Externals included Unable to connect to a repository at URL 'svn+ssh://rhodecode@svn.xxx.xx/Administration/Test' Network connection closed unexpectedly

Rhodecode sshd says:
shd-1 | Accepted publickey for rhodecode from xxxx port 57536 ssh2: RSA SHA256:SFVZwvMtEkvm4X5a4DLs/dgCAngQke2LLZnbFCrEQjc

And as already said, linux works…
Anyone with success ? Any hints to debug ?

Hello,

We use secured SVN connections with TortoiseSVN on RhodeCode 5.x, but essentially with HTTPS (without SSH keys). If I remember well, we used SVN+SSH at start but switched to HTTPS because it was simpler to manage (or maybe it didn’t work at all with SSH, just like you…).

Did you try to use the command-line SVN tool from Windows? Should probably be easier for debugging the client side.

Justin

So I’ve just made a test with the command line tool from a Windows client.

  1. The first try timed out with the following error:

svn checkout svn+ssh://rhodecode@[..url..]

svn: E170013: Unable to connect to a repository at URL 'svn+ssh://rhodecode@[..url..]'
svn: E210002: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
svn: E210002: Network connection closed unexpectedly
  1. Then I’ve edited my SVN (client-side) configuration file to match the SSH port used on my RhodeCode install, something like ssh = TortoisePlink.exe -P 22 -ssh (I take 22 as an example, this is not the one we use :slightly_smiling_face:)

The second try gives an new error message “No supported authentication methods available”:


just like if Pageant and TortoisePlink aren’t able to present my private key.

  1. Now without TortoisePlink: ssh = C:/plink.exe -ssh -P 22

svn checkout svn+ssh://rhodecode@[..url..]

FATAL ERROR: No supported authentication methods available (server sent: publickey)
svn: E170013: Unable to connect to a repository at URL 'svn+ssh://rhodecode@[..url..]'
svn: E210002: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
svn: E210002: Network connection closed unexpectedly
  1. Fourth try with debug info: ssh = C:/plink.exe -agent -ssh -P 22 -v

svn checkout svn+ssh://rhodecode@[..url..]

Looking up host "{{HOST}}" for SSH connection
Connecting to {{IP ADDR}} port {{PORT}}
We claim version: SSH-2.0-PuTTY_Release_0.80
Connected to {{IP ADDR}}
Remote version: SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.12
Using SSH protocol version 2
No GSSAPI security context available
Enabling strict key exchange semantics
Doing NTRU Prime / Curve25519 hybrid key exchange, using hash SHA-512 (unaccelerated)
Server also has ecdsa-sha2-nistp256/rsa-sha2-512/rsa-sha2-256 host keys, but we don't know any of them
Host key fingerprint is:
ssh-ed25519 255 SHA256:wb1paNKfC/kyUqqRalHraPAJI3Wgtddf2/GwNorAV+c
Initialised AES-256 SDCTR (AES-NI accelerated) outbound encryption
Initialised HMAC-SHA-256 (unaccelerated) outbound MAC algorithm
Initialised AES-256 SDCTR (AES-NI accelerated) inbound encryption
Initialised HMAC-SHA-256 (unaccelerated) inbound MAC algorithm
Pageant is running. Requesting keys.
Pageant has 2 SSH-2 keys
Using username "rhodecode".
Trying Pageant key #0
Server refused our key
Trying Pageant key #1
Server refused our key
No supported authentication methods available (server sent: publickey)
FATAL ERROR: No supported authentication methods available (server sent: publickey)
svn: E170013: Unable to connect to a repository at URL 'svn+ssh://rhodecode@[..url..]'
svn: E210002: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
svn: E210002: Network connection closed unexpectedly

Looks like my SSH key is not accepted on the server side. I’ve added my public key from my profile page, but is it enough? I don’t know…

command line is working for me now with plink
I have to set it to:
Plink -i c:\users\pk1057\.ssh\rhodeocode.ppk -P 9022 -l rhodecode
I set it up in the tunnels section of TortoiseSVN, plink and TortoisePlink works

But TortoiseSVN gui says:
svnserve: E210004: Malformed network data

And GUI is improtant because the user are not capable to work with cli…

Well done.

How have you submitted your public key to RhodeCode? I personally don’t understand why my private key is refused from the server.

But TortoiseSVN gui says:
svnserve: E210004: Malformed network data

Question: It seems to be a server message, so why don’t you get the same error from the command line with plink? Looks like TortoisePlink behaves differently.

I’m using the key generator inside rhodecode.
I only had problem with Putty and the conversion so i followed the link use legacy format and this key worked for me.
And yes plink and tortoiseplink seems to behave differently, but you can use both in the tunnels section…

Now the most important question is, why does tortoisegui not work, i have no clue.

1 Like

I tried now a connection with netbeans svn.
When i use the stand JavalHL implementation it fails like Tortosie.
When i switch to use the slikSVN cli client it works.
The communcation fails when TortoiseSVN executes “exec svnserve -t” after connection, don’t know why it seems

Event Log: Started a shell/command
Incoming packet #0xe, type 94 / 0x5e (SSH2_MSG_CHANNEL_DATA)
  00000000  00 00 01 00 00 00 00 cf 28 20 73 75 63 63 65 73  ........( succes
  00000010  73 20 28 20 32 20 32 20 28 20 29 20 28 20 65 64  s ( 2 2 ( ) ( ed
  00000020  69 74 2d 70 69 70 65 6c 69 6e 65 20 73 76 6e 64  it-pipeline svnd
  00000030  69 66 66 31 20 61 63 63 65 70 74 73 2d 73 76 6e  iff1 accepts-svn
  00000040  64 69 66 66 32 20 61 62 73 65 6e 74 2d 65 6e 74  diff2 absent-ent
  00000050  72 69 65 73 20 63 6f 6d 6d 69 74 2d 72 65 76 70  ries commit-revp
  00000060  72 6f 70 73 20 64 65 70 74 68 20 6c 6f 67 2d 72  rops depth log-r
  00000070  65 76 70 72 6f 70 73 20 61 74 6f 6d 69 63 2d 72  evprops atomic-r
  00000080  65 76 70 72 6f 70 73 20 70 61 72 74 69 61 6c 2d  evprops partial-
  00000090  72 65 70 6c 61 79 20 69 6e 68 65 72 69 74 65 64  replay inherited
  000000a0  2d 70 72 6f 70 73 20 65 70 68 65 6d 65 72 61 6c  -props ephemeral
  000000b0  2d 74 78 6e 70 72 6f 70 73 20 66 69 6c 65 2d 72  -txnprops file-r
  000000c0  65 76 73 2d 72 65 76 65 72 73 65 20 6c 69 73 74  evs-reverse list
  000000d0  20 29 20 29 20 29 20                              ) ) ) 
Outgoing packet #0xa, type 94 / 0x5e (SSH2_MSG_CHANNEL_DATA)
  00000000  00 00 00 00 00 00 00 d7 28 20 32 20 28 20 65 64  ........( 2 ( ed
  00000010  69 74 2d 70 69 70 65 6c 69 6e 65 20 73 76 6e 64  it-pipeline svnd
  00000020  69 66 66 31 20 61 63 63 65 70 74 73 2d 73 76 6e  iff1 accepts-svn
  00000030  64 69 66 66 32 20 61 62 73 65 6e 74 2d 65 6e 74  diff2 absent-ent
  00000040  72 69 65 73 20 64 65 70 74 68 20 6d 65 72 67 65  ries depth merge
  00000050  69 6e 66 6f 20 6c 6f 67 2d 72 65 76 70 72 6f 70  info log-revprop
  00000060  73 20 29 20 34 37 3a 73 76 6e 2b 73 73 68 3a 2f  s ) 47:svn+ssh:/
  00000070  2f 73 76 6e 30 36 2d 30 30 31 2e 65 64 61 67 2e  /svn.xx.
  00000080  64 65 2f 41 64 6d 69 6e 69 73 74 72 61 74 69 6f  de/Administratio
  00000090  6e 2f 54 65 73 74 20 33 34 3a 53 56 4e 2f 31 2e  n/Test 34:SVN/1.
  000000a0  31 34 2e 35 20 28 78 36 34 2d 6d 69 63 72 6f 73  14.5 (x64-micros
  000000b0  6f 66 74 2d 77 69 6e 64 6f 77 73 29 20 28 20 32  oft-windows) ( 2
  000000c0  34 3a 54 6f 72 74 6f 69 73 65 53 56 4e 2d 31 2e  4:TortoiseSVN-1.
  000000d0  31 34 2e 39 2e 32 39 37 34 33 20 29 20 29 20     14.9.29743 ) ) 
Incoming packet #0xf, type 95 / 0x5f (SSH2_MSG_CHANNEL_EXTENDED_DATA)
  00000000  00 00 01 00 00 00 00 01 00 00 00 2a 73 76 6e 73  ...........*svns
  00000010  65 72 76 65 3a 20 45 32 31 30 30 30 34 3a 20 4d  erve: E210004: M
  00000020  61 6c 66 6f 72 6d 65 64 20 6e 65 74 77 6f 72 6b  alformed network
  00000030  20 64 61 74 61 0a                                 data.

And this is a working session not with Tortoise.
I will file a bug at the Tortoise Development group

Event Log: Started a shell/command
Incoming packet #0xe, type 94 / 0x5e (SSH2_MSG_CHANNEL_DATA)
  00000000  00 00 01 00 00 00 00 cf 28 20 73 75 63 63 65 73  ........( succes
  00000010  73 20 28 20 32 20 32 20 28 20 29 20 28 20 65 64  s ( 2 2 ( ) ( ed
  00000020  69 74 2d 70 69 70 65 6c 69 6e 65 20 73 76 6e 64  it-pipeline svnd
  00000030  69 66 66 31 20 61 63 63 65 70 74 73 2d 73 76 6e  iff1 accepts-svn
  00000040  64 69 66 66 32 20 61 62 73 65 6e 74 2d 65 6e 74  diff2 absent-ent
  00000050  72 69 65 73 20 63 6f 6d 6d 69 74 2d 72 65 76 70  ries commit-revp
  00000060  72 6f 70 73 20 64 65 70 74 68 20 6c 6f 67 2d 72  rops depth log-r
  00000070  65 76 70 72 6f 70 73 20 61 74 6f 6d 69 63 2d 72  evprops atomic-r
  00000080  65 76 70 72 6f 70 73 20 70 61 72 74 69 61 6c 2d  evprops partial-
  00000090  72 65 70 6c 61 79 20 69 6e 68 65 72 69 74 65 64  replay inherited
  000000a0  2d 70 72 6f 70 73 20 65 70 68 65 6d 65 72 61 6c  -props ephemeral
  000000b0  2d 74 78 6e 70 72 6f 70 73 20 66 69 6c 65 2d 72  -txnprops file-r
  000000c0  65 76 73 2d 72 65 76 65 72 73 65 20 6c 69 73 74  evs-reverse list
  000000d0  20 29 20 29 20 29 20                              ) ) ) 
Outgoing packet #0xa, type 94 / 0x5e (SSH2_MSG_CHANNEL_DATA)
  00000000  00 00 00 00 00 00 00 c3 28 20 32 20 28 20 65 64  ........( 2 ( ed
  00000010  69 74 2d 70 69 70 65 6c 69 6e 65 20 73 76 6e 64  it-pipeline svnd
  00000020  69 66 66 31 20 61 63 63 65 70 74 73 2d 73 76 6e  iff1 accepts-svn
  00000030  64 69 66 66 32 20 61 62 73 65 6e 74 2d 65 6e 74  diff2 absent-ent
  00000040  72 69 65 73 20 64 65 70 74 68 20 6d 65 72 67 65  ries depth merge
  00000050  69 6e 66 6f 20 6c 6f 67 2d 72 65 76 70 72 6f 70  info log-revprop
  00000060  73 20 29 20 34 37 3a 73 76 6e 2b 73 73 68 3a 2f  s ) 47:svn+ssh:/
  00000070  2f 73 76 6e 30 36 2d 30 30 31 2e 65 64 61 67 2e  /svn.xx.
  00000080  64 65 2f 41 64 6d 69 6e 69 73 74 72 61 74 69 6f  de/Administratio
  00000090  6e 2f 54 65 73 74 20 34 32 3a 53 56 4e 2f 31 2e  n/Test 42:SVN/1.
  000000a0  31 34 2e 35 2d 53 6c 69 6b 53 76 6e 20 28 78 36  14.5-SlikSvn (x6
  000000b0  34 2d 6d 69 63 72 6f 73 6f 66 74 2d 77 69 6e 64  4-microsoft-wind
  000000c0  6f 77 73 29 20 28 20 29 20 29 20                 ows) ( ) ) 
Incoming packet #0xf, type 94 / 0x5e (SSH2_MSG_CHANNEL_DATA)
  00000000  00 00 01 00 00 00 00 4f 28 20 73 75 63 63 65 73  .......O( succes
  00000010  73 20 28 20 28 20 41 4e 4f 4e 59 4d 4f 55 53 20  s ( ( ANONYMOUS 
  00000020  45 58 54 45 52 4e 41 4c 20 29 20 33 36 3a 61 34  EXTERNAL ) 36:a4
  00000030  33 37 36 36 63 61 2d 61 32 34 64 2d 31 31 65 64  3766ca-a24d-11ed
  00000040  2d 61 64 32 35 2d 63 37 31 30 34 31 64 37 65 62  -ad25-c71041d7eb
  00000050  30 63 20 29 20 29 20                             0c ) )