Sloan Digital Sky Survey

CVS and SSH on Windows

The FERMI lab CVS uses SSH1 while JHU machines work with SSH2. This means you need different keys to work with each system. You also need some software . There are probably other ways to do this but the following works.


Of course you need CVS which you may get from or simply take this cvs.exe. The exe just needs to be in your path.
Additionally you need SSH software. Download the following and put it somewhere - say c:\ssh.
  • Plink.exe works for both systems as an ssh client.
  • To do updates you will need pageant.exe
  • For getting you KEY in the correct format you need puttygen.exe

    Public/Private Keys

    Plink does not work with all existing ssh keys such as we have on UNIX. However puttygen allows one to generate a putty version of the private key which my be used by plink. The public part is fine.
    If you have an identity or an id_rsa which is already in use run puttygen and load the key file. You may then save a new private key lets call it "putty.ppk".
    If you do not have a key already then simply generate one with puttygen after starting it.
    Notice in putty there is a key comment - put your email address in there if you want this to work with FERMI CVS.
    To use this with key with JHU systems generate an SSH2 key. For FERMI generate an SSH1 key.

    Publishing the key

    For JHU on our system take your Public SSH2 key and add it to authorized_keys2 in your .ssh directory on UNIX.
    For FERMI you need to send the key to Jen.

    Making the key work with SSH and CVS

    On windows the simplest way to do this is write a simple script - create a script, lets call it psh.cmd in the c:\ssh directory created earlier. In this file place the following command line
    c:\ssh\plink.exe -x -A -ssh -l cvsuser -1 -i  "c:\ssh\putty.ppk" %*%
    This assumes you put your putty.ppk in the ssh directory. For use with JHU systems the -1 which forces plink to use ssh1 is not needed (and the key needs to be ssh2).

    To make CVS use this you need to simply set the CVS_RSH environment variable. Use System /Advanced/ Environment Variables : create a variable called CVS_RSH set the value to c:\ssh\psh.cmd.

    Making updates

    To make updates to FERMI you need to use the ssh agent. Simply run :
    c:\ssh\pageant.exe c:\ssh\putty.ppk
    Then use CVS as normal.

    William O'Mullane
    Last Modified :Thursday, June 23, 2005 at 4:06:54 PM , $Revision 1.3 $