Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

svn co svn+ssh:// 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

share|improve this question

2 Answers 2

up vote 15 down vote accepted

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

foo = ssh -p 20000

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

share|improve this answer
Also, if you want to override the default svn+ssh protocol's port, just define ssh = ssh -p 20000. This assumes you've modified /etc/ssh/sshd_config on the server so that Port 22 is replaced with Port 20000. –  Dogbert Sep 29 '13 at 18:01
@Dogbert: it doesn't work like you say: I tried ssh = ssh -p 20000 and then tried to checkout svn+ssh:// but this still tries on port 22 –  rubo77 Jan 26 at 16:15

Whenever you need to access an ssh server on a non-default port or with a different user name, you can define an alias in ~/.ssh/config.

Host mysvn
Port 20000
User jm

Then run svn co svn+ssh://mysvn/home/svn/proj1.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.