Using ssh+svn through non-standard port

215 views
Skip to first unread message

Nikki Locke

unread,
Nov 17, 2009, 9:31:54 AM11/17/09
to us...@tortoisesvn.tigris.org
Our SVN server (on a Linux box) is accessed using SSH, but this listens on a non-standard port (for firewalling reasons - port 22 is busy doing something else, and to stop idiot hackers filling up the logs with their hacking attempts).

We build the same software on both Linux and Windows. On Windows, I have set up a putty session, and I use the session name in my svn urls (e.g. "svn+ssh://@svnserver/repo"). On Linux I have set up a tunnel in the .subversion/config file, containing "svnserver = $SVN_SSH ssh -p 4001". The Linux urls are therefore of the form "svn+svnserver://ni...@123.456.789.123/repo.

We have just decided to start using svn externals, and we have an issue with the url to use in the externals property - if we use the WIndows one, it doesn't work on Linux, and if we use the Linux one it doesn't work on Windows.

I thought I could maybe add a similar tunnel in the Tortoise config file (which I found in ~\Application Data\Subversion), but I can't seem to get it working (I get "Network connection closed unexpectedly). This is what I used:

svnserver = $SVN_SSH TortoisePlink -P 4001

TortoisePlink is on my PATH.

Any suggestions as to what is wrong with my tunnel line, or how else to be able to use the same url in both Windows and Linux?

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2418948

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

Nikki Locke

unread,
Nov 17, 2009, 11:50:21 AM11/17/09
to us...@tortoisesvn.tigris.org
Duh!
I was just doing the svn:external property when a tooltip popped up and told me about relative urls!

Problem solved.

It's good, Tortoise SVN, isn't it!

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2419015

Thomas Harold

unread,
Nov 17, 2009, 12:08:20 PM11/17/09
to us...@tortoisesvn.tigris.org, Nikki Locke
On 11/17/2009 9:31 AM, Nikki Locke wrote:
> Our SVN server (on a Linux box) is accessed using SSH, but this listens on a non-standard port (for firewalling reasons - port 22 is busy doing something else, and to stop idiot hackers filling up the logs with their hacking attempts).
>
> We build the same software on both Linux and Windows. On Windows, I have set up a putty session, and I use the session name in my svn urls (e.g. "svn+ssh://@svnserver/repo"). On Linux I have set up a tunnel in the .subversion/config file, containing "svnserver = $SVN_SSH ssh -p 4001". The Linux urls are therefore of the form "svn+svnserver://ni...@123.456.789.123/repo.
>
> We have just decided to start using svn externals, and we have an issue with the url to use in the externals property - if we use the WIndows one, it doesn't work on Linux, and if we use the Linux one it doesn't work on Windows.
>
> I thought I could maybe add a similar tunnel in the Tortoise config file (which I found in ~\Application Data\Subversion), but I can't seem to get it working (I get "Network connection closed unexpectedly). This is what I used:
>
> svnserver = $SVN_SSH TortoisePlink -P 4001
>
> TortoisePlink is on my PATH.
>
> Any suggestions as to what is wrong with my tunnel line, or how else to be able to use the same url in both Windows and Linux?
>

You'll need to create a PuTTY session that is named as a combination of
the server name and the port number. This also fixes the CollabNet SVN
client on Windows.

http://www.tgharold.com/techblog/2007/07/setting-up-svnssh-on-alternate-point.shtml

http://svn.haxx.se/tsvnusers/archive-2007-01/0272.shtml

# Right-click on the Pageant icon in the system tray (I'm assuming that
you're loading the SSH public key that you use for SVN into Pageant).

# Choose "New Session"

# Enter the hostname / IP address and SSH port that you'll be connecting
to. If you're going to connect as "svn+ssh://svn.tgharold.com:2222",
then this would be "svn.tgharold.com" and "2222". You'll also want to
specify the username to login as in the profile before you save it.

# Go back to the "Session" tab and name the session as
"svn.tgharold.com:2222".

...

For Linux/Unix, you need to edit the ~/.ssh/config file.

Host svn.tgharold.com
Port 2222
User fred-svn
IdentityFile /home/fred/.ssh/svnkey

Which lets you use URLs like svn+ssh://svn.tgharold.com:2222/reponame on
both sides of the equation.

...

But the real solution for externals is to use the new "relative" path
formats.

../ -- Relative to the URL of the directory on which the svn:externals
property is set

^/ -- Relative to the root of the repository in which the svn:externals
property is versioned

// -- Relative to the scheme of the URL of the directory on which the
svn:externals property is set

/ -- Relative to the root URL of the server on which the svn:externals
property is versioned

http://svnbook.red-bean.com/en/1.5/svn.advanced.externals.html

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2419019

Nikki Locke

unread,
Nov 18, 2009, 10:53:50 AM11/18/09
to us...@tortoisesvn.tigris.org
Thanks for the comprehensive reply.

What version of svn on Linux is required to support the new syntax?

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2419562

Thomas Harold

unread,
Nov 18, 2009, 3:20:10 PM11/18/09
to us...@tortoisesvn.tigris.org, Nikki Locke
On 11/18/2009 10:53 AM, Nikki Locke wrote:
> Thanks for the comprehensive reply.
>
> What version of svn on Linux is required to support the new syntax?

I believe relative externals were added in 1.5 (in fact the svnbook page
backs that up). So any version of 1.5 or 1.6 or later.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2419680

Reply all
Reply to author
Forward
0 new messages