This is a quick HOWTO that explains how to use cvs over an ssh connection for UNIX and Windows, and specifically how to connect to the ecoinformatics.org cvs server. I assume that you have a strong knowledge of cvs and ssh already, and so this document simply points out the steps to use the two together.
Here are some common cvs commands that you'll want to learn about in order to effectively use cvs:
cvs checkout -Pcvs update -d -P -Acvs commitcvs logcvs statuscvs diff -uIn both the UNIX and Windows cases, you must have cvs installed and available on a remote server (in our case, cvs.ecoinformatics.org), the ssh server installed on that same machine as cvs (we do!), and the ssh and cvs clients installed on the local machine. You must also have an account on the server (cvs.ecoinformatics.org) that allows access to the cvs repository files.
Make sure that ssh is set up correctly and that you can connect using your ssh client. You can choose to simply use password authentication, in which case you'll need to type in your password for each and every cvs command you issue. Alternatively, you can create an RSA key (identity and identity.pub) on the ssh server (use ssh-keygen), appending the resulting public key (identity.pub) to your "authorized_hosts" file, and copying the resulting private key (identity) to your client machine. If you create a key with no password, you will be able to use the cvs commands without having to type a password each time. Paranoia levels vary, so only do this if you understand and are comfortable with the security risks that it poses.
Try it! cvs checkout test
Some other information on setting up cvs over ssh for UNIX is at:
http://forum.swarthmore.edu/~sasha/tech/cvs-unix-ssh.html
We use WinCVS ( http://www.wincvs.org) as our current graphical CVS client, and have successfully set it up to use ssh1 authentication. This description is largely based on the WinCVS FAQ section on the same topic contributed by Patrik Sundberg. I would recommend WinCVS 1.3beta6 or later (it gets easier to set up ssh with each version of WinCVS), but I have also made it work successfully with versions 1.2 and 1.0.6. Other Windows CVS clients may also work over ssh, but I haven't figured it out. If you determine how to set it up for others (e.g., jCVS), please mail me and I'll add the information.
Install a commandline ssh, which is most easily done by installing the Cygwin tools (http://www.cygwin.com). Openssh comes with Cygwin, so you should be have everything you need.
Note: Although I tried several ssh clients,
including SecureCRT, I was only able to get this to work with
openssh as part of cygwin and the free
client for win32 (doesn't handle ssh2 though). Get it at:
ftp://ftp.cs.hut.fi/pub/ssh/contrib
Get the newest win32-version of ssh1 (I used ssh-1_2_14-win32bin.zip).
If you are going to use password authentication (see above), you can skip this step. Generate an identity and identity.pub using ssh-keygen. Configure ssh so that it will use the identity when logging into cvs.ecoinformatics.org (see the standard ssh documentation). This generally involves making sure that your identity.pub key has been appended to the end of your "authorized_keys" file on the cvs server. (usually in your ".ssh" directory)
Make a few environment changes. , either by modifying the autoexec.bat file (Windows 95/98) or by using the system control panel (Windows NT).
Add the directory that contains ssh.exe to the PATH variable - the PATH variable should already exist.
CVS_RSH=ssh Set the environemnt variable CVS_RSH to the value "ssh"
Try it (see the checkout command above)! Note that when you issue a cvs command, if your identity file has a password, a DOS window will show up in the background and ask for the password. Until you provide it, WinCVS will just sit there and wait, apparently doing nothing (except waiting for you!).
That's about it.
jones@nceas.ucsb.edu 21 November 2001