Take the 2-minute tour ×
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://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

share|improve this question

2 Answers 2

up vote 9 down vote accepted

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.

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

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
HostName server.com
Port 20000
User jm

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

share|improve this answer

Your Answer

 
discard

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.