Setting up WinCVS to use PuTTY to connect to cdcvs

Setting up WinCVS to use PuTTY is fairly straghtforward, but does require a few configuration settints in addition to installing the software. You can do it with the following steps.

1. Install PuTTY Home page Downloads (get the putty-xxx-installer.exe)

2. Install wincvs Home Page Downloads (get the latest non-beta zip file, unpack it with winzip, and run the setup.exe in there.)

3. Make a key
Follow menus: Start/Programs/PuTTY/PuTTYgen From the PuTTY Manual:



In the "Parameters" box, select the type of key to generate - SSH-1 RSAorSSH-2 RSA.

...press the "Generate" button and PuTTYgen will begin the process of actually generating the key.

First, a progress bar will appear and PuTTYgen will ask you to move the mouse around to generate randomness. Wave the mouse in circles over the blank area in the PuTTYgen window, and the progress bar will gradually fill up as PuTTYgen collects enough randomness. You don't need to wave the mouse in particularly imaginative patterns (although it can't hurt); PuTTYgen will collect enough randomness just from the fine detail of exactly how far the mouse has moved each time Windows samples its position.

When the progress bar reaches the end, PuTTYgen will begin creating the key. The progress bar will reset to the start, and gradually move up again to track the progress of the key generation. It will not move evenly, and may occasionally slow down to a stop; this is unfortunately unavoidable, because key generation is a random process and it is impossible to reliably predict how long it will take.

When the key generation is complete, a new set of controls will appear in the window to indicate this.

Or, if you have an ssh1 key on your Unix account, use ftp with a binary transfer to download it, and skip the next two steps.

4. Set the key comment and password. Set the key comment to your email address by typing it into the "Key Comment" box. Set the password by entering it twice, once in the "Key passphrase" box and once in the "Confirm Passphrase" box.

5. Save the keys:
save the public key on your desktop as identity.pub and the private one as identity.ppk

6. email the identity.pub file as an attachment to csi-help@fnal.gov and ask for it to be added to the .ssh/authorized_keys file for your cvs repository. Please specify which repository you are requesting access to in the e-mail.

7. Setup environment variables

o Choose Menus:
Start/Settings/Control Pane

o Double click on the "System" Control Panel

o Pick the "Advanced" tab and pick "Environment Varibles..."

o Add User environement variables

§ Add PLINK_PROTOCOL value "ssh"

§ Add CVS_RSH value "plink"

§ Edit or Add PATH appending value ";C:\Program Files\PuTTY"



8. In WinCVS, bring upthe "Preferences" dialog box from the Admin menu.

o inthe"Globals" tab, select the checkbox for "Checkout text files with the Unix LF(0xa)"if your cvs repository resides on a Unix or Linux machine.Select OK to save and dismiss menu.

o bringup the "Login" dialog box from the Admin menu. Select the Login settings tab. Select the "CVSROOT" checkbox, and enter your CVSROOT value, (i.e. :ssh:cdwebcvs@cdcvs.fnal.gov:/cvs/cdweb or:ssh:cvsuser@cdcvs.fnal.gov:/cvs/cd )

o Select OK to save and dismiss the menu.

8.1. In WinCVS, bring up the "Preferences" dialogue box from the Admin menu

oin the "General" tab put in your CVSROOT value, (i.e. :ext:cdwebcvs@cdcvs.fnal.gov:/cvs/cdweb or :ext:cvsuser@cdcvs.fnal.gov:/cvs/cd)

oswitch to the "Ports" tab.

oTick the box there labelled "Check for an alternate rsh name" and in the text entry field to the right enter "plink".

oSelect "OK" on the "Preferences" dialogue box.

9. Once you've heard back from the cdcvs administrator that your ssh keys have been added, test your putty key configuration:

o double click on "identity.ppk" on your desktop.

o If your identity file isn't already loaded, you will be prompted for the password you entered in step 4.

o The Pageant icon (a little PC with a hat) should appear in the bottom right menu bar.

o pick Start/Run... from the menu bar

o enter "cmd.exe" in the box and click OK to get a command window.

o enter the command:
plink cvsuser@cdcvs.fnal.gov echo hi

o You should get the response
Only lscvs and cvs commands are allowed.



10. Double click on PuTTYconfigurationdesktop icon to configure.

o Under category "Session", select Protocal SSH.

o Under category "Connection", sub-category SSH, Auth, Authentication parameters, check the box for "Allow agent forwarding".

o Under category "Session", left-click "Default Settings", then left-click the "Save" button.

You should now be able to use WinCVS to access the repository, with a secure connection, whenever Pageant is running; and you can start Pageant by double-clicking on your identity.ppk file.