ssh tunneling with visualsvn

Posted by DeveloperChris on Stack Overflow See other posts from Stack Overflow or by DeveloperChris
Published on 2010-04-13T00:20:29Z Indexed on 2010/04/13 0:22 UTC
Read the original article Hit count: 695

I have been asked to setup visualsvn for visual studio 2008

Due to firewall restrictions and server configuration. I need to use ssh tunneling.

My problem is this.

The local machine needs to connect to a gateway machine via ssh then connect to the subversion server so

Local machine ---{ssh}--- gateway ---{ssh}-- subversion server

I am not exactly sure of the correct process to do this.

It appears that I must start a ssh process using plink to open a local port and forward that to the remote subversion server.

eg: plink user@gateway -L 22:192.168.1.1:22

Then when visualsvn starts it uses tortoiseplink to make the actual connection through to the subversion server using svn+ssh://username@localhost:22/myrepo

This seems very very clunky. firstly it needs several steps to setup the connection secondly I need plink running which leaves a command prompt on the desktop (clutter = yuck)

lastly I need to use two different programs that do the same thing. (plink + tortoiseplink)

The problem is that tortoiseplink doesn't run in the background. As soon as I connect to the ssh gateway and enter the password it closes again. So I can't use it to create the initial connection.

If I use plink instead of tortoiseplink in visualsvn then I never get prompted for the password. so it just hangs with an open command prompt and no password request.

Is there a way to setup visualsvn so that everything happens in one command line?

I have searched high and low for a suitable and clean method to tunnel from visualsvn to the remote server and have found very little. it all either assumes one hop (not two like mine) or it glosses over all the hard bits.

DC

© Stack Overflow or respective owner

Related posts about visualsvn

Related posts about ssh