Subscribe to our feed

Symfony Experts

Symfony Experts
If you have an urgent question for a symfony-related issue, this is the place to ask.


Stack Overflow

The old fashioned way


February 9, 2008 – 5:02pm Using svnX with svn+ssh on a non-standard port

svnX is a great mac GUI for svn repositories. A lot of our svn servers are accessed via non-standard ports for security, and a limitation of the svn+ssh syntax is that you can’t specify a non-standard port in the address name. To get around this in the command line, you can set a local environment variable “SVN_SSH” like so:

export SVN_SSH="ssh -p xxxx"

where xxxx is the port number. That works well if all of your SVN repositories that you access via SSH use the same port number, and if you *don’t* use svnX.

svnX doesn’t use your .bash_login environment variables before running it’s commands, so it’s doesn’t see you want to use a non-standard ssh. However, you *can* add custom ssh hostnames that use your non standard port, and then pass these to svnX as the path.

Open up ~/.ssh/config (or create it if it doesn’t exist) and add a host name like so:

host svn1
  Port xxxx
  ForwardAgent no
  ForwardX11 no

And then finally, when you put in the path in svnx, use “svn1” as the hostname:

Path: svn+ssh://username@svn1/path/to/repository

svnX will now be able to access your svn repository through a non-standard ssh port.

Posted by in  OS X Web Development   |  

2 Responses to Using svnX with svn+ssh on a non-standard port

  1. kevin says:

    Hi. I believe the ‘host’ needs to be ‘Host’ in the first line of you .ssh/config

  2. Scott Meves says:

    Interesting. This may be the case on some systems. On OS X 10.5 it seems okay with the lowercase ‘h’ but I bet it’s better to keep it “Host” just in case. Thanks!