This one took me a few hours, but I finally found the answer here (my guide adds an extra line to the config file – but many thanks for helping me fix this error!!!):
http://desk.stinkpot.org:8080/tricks/index.php/2008/05/how-to-use-svnssh-with-a-non-standard-port/
You might notice that you get a “svn: Network connection closed unexpectedly” error if you try the command
svn list svn+ssh://username@ip_address:port_number/path/to/repo
This is because that particular command does not play too well with “:port_number” section (as in, svn+ssh does not play nice with alternate ports). All you have to do is create an alias in ~/.ssh/config (assuming you’re using Linux):
nano ~/.ssh/config
Add the following:
Host alias_name HostName ip_address User username Port port_number
Then, to use the ssh+svn command:
svn list svn+ssh://username@alias_name/path/to/repo
Blamo! The svn+ssh command uses the information provided by the alias to access the repo.