Ssh – How to configure SVN/SSH with SSH on non standard port

sshsubversiontcp

I have configured SSH to be on port 20000. When I try:

svn co svn+ssh://server.com:20000/home/svn/proj1 proj1 --username jm

I get

svn: To better debug SSH connection problems, remove the -q option
from 'ssh' in the [tunnels] section of your Subversion configuration
file. svn: Network connection closed unexpectedly

I think I need to tell SVN to use port 20000 also?

I am on Ubuntu 11.10

Best Answer

You can define a new 'tunnel' in your Subversion configuration (~/.subversion/config). Find the section [tunnels] there and define something like:

[tunnels]
foo = ssh -p 20000

Afterwards you can contact your repository via the URL svn+foo://server.com/home/svn/proj1 proj1.

Related Question