Sep
23
CVS over SSH on a Non-Standard Port
Filed Under Computers & Tech, System Administration on September 23, 2007 at 5:23 pm
If you access CVS over SSH you will know that you have to do two things to get it working. Firstly, you have to set the CVS_RSH
environment variable to the location of your SSH binary. Secondly you have to use the :ext:
scheme for the CVSROOT
environment variable (or -d
flag). The thing is, there is no place in the :ext:
scheme to set a port number! This means that CVS will try to open the SSH connection to the specified server on the standard SSH port. I don’t like running SSHD on the standard port, I much prefer to stick it on a non-standard port, but does that mean I can’t use CVS over SSH? Well, if you leave things to CVS then yes, but luckily OpenSSH is not as retarded as CVS and provides you with a simple mechanism for over-ridding the default port on a per-host basis. The key is to add an entry for the host in question to your ~/.ssh/config
file. The sample below tells SSH to use port 123 as the default port when connecting to the server my.machine.ie
:
Host my.machine.ie Port 123
This will work on Unix, Linux and OS X as well as through Cygwin on Windows.
[tags]SSH, CVS, OpenSSH[/tags]
Yep, the .ssh/config file is really handy, you can pretty much set all the ssh options on a per host basis.
Or you could cheat , use Eclipse as your CVS client and just change the SSH settings under the ‘preferences’ menu.
Ok, doesn’t give you as much technical Kudos, but it works 🙂
Paul
Thanks for the very helpful tip.
Thanks for that info 🙂 I hope OpenCVS adds this option, think I found a calling to patch this into OpenCVS that is if they haven’t already.
Thanks. Finally I’ve found what I was looking for.
It works pretty fine.