CVS over SSH using port OTHER THAN 22
Monday, July 31st, 2006I got tired of all the little script kiddies banging away at my SSH server 24 hours a day, so I run ssh on a different port than the default of 22. I setup CVS on this server as well, and wanted to check in/out some files remotely but didn’t know how to handle the alternate port issue.
Just like you would do with CVS over SSH on the standard port, you would include this in your ~/.bashrc file:
export CVS_RSH='ssh'
export CVSROOT=':ext:user@server:/path/to/cvsroot'
to get around the alternate port issue, use the ~/.ssh/config file. It’s this simple:
Host my.hostname.com
Port 12345
Not only does this make CVS work for your remote server, you no longer have to always specify the port number from the command line when SSHing to the server (I wish had known about this months ago)




