Pageant Login for CVS Repository

HOW TO

This page contains instructions for using Pageant as your login method for the pvalentino Discoveries CVS repository. Contact Paul Valentino with questions or comments about this guide.

  • Download PuTTY

The download page is here. You will need most of the binaries available there, so it's probably easiest to just download putty.zip so you have everything.

If you prefer to get only what you need, download putty, pageant, puttygen, and plink.

There is no installer or setup you need to run to use PuTTY, simply download/unzip the files to the directory you want to run them from. If you want to be able to run them from anywhere, place them in a directory that is in your system's PATH; c:windowssystem32 will work for Windows 95/98/Me/XP, or c:winntsystem32 for Windows NT/2000.

  • Generate public and private keys

Open a command prompt and navigate to the directory where you put the PuTTY binaries (if you put them in c:windowssystem32 or any other directory in your system's PATH, just open the command prompt - you can do all the following steps from anywhere). Type "puttygen" and hit Enter to launch the PuTTY key generator. Select SSH2 DSA in the Paramaters section at the bottom:

Click the "Generate" button and move the mouse around in the "Key" area at the top to create some randomness. After a short time, the program will take over, generate a key, and display it for you:

Set a passphrase to protect your private key. Without one, anybody with access to the key file will be able to use it to log in to your account (Note that unlike other methods for accessing CVS over SSH, PuTTY will not prompt you for your passphrase every time you issue a CVS command; it will only prompt you once). The value in the Key Comment field will be used when you are prompted for the passphrase, so you may want to change it to something meaningful.

Click the "Save private key" button. Give your private key an appropriate file name such as pvalentino_cvs.ppk and remember where you saved it.

Save public key and pvalentino_pub. Leave PuTTYgen open for the next step.

  • Configuring PuTTY

At the command prompt, type "putty" and hit enter. This will launch the PuTTY configuration dialog box.

Make sure the SSH protocol is selected. Enter dev.gopvalentino.com in the Host Name field. Enter PVALENTINO in the Saved Sessions list, then click the "Save" button. Click "Cancel" to close the dialog.

  • Putting your public key on the server

Use PuTTY to connect to dev.gopvalentino.com by typing "putty dev.gopvalentino.com" at the command line then hitting Enter. Provide your username and password when prompted. You may get a message about a server host key; click "Yes" to allow PuTTY to cache the host key and it shouldn't bother you about it anymore.

Make sure that you are in your home directory. Type "cd .ssh" and hit Enter to change to that directory. If .ssh does not exist run mkdir .ssh.

If you have a preferred UNIX text editor, use it to create and open the file authorized_keys. Put it in insert mode on a new, blank line.

To do this with vi, type "vi authorized_keys" and hit Enter. This will create the file if it doesn't already exist and open it for editing. Type "o". This will put vi in insert mode on a new line.

In PuTTYgen, select the entire contents of the public key box and press Ctrl+C to copy it to the clipboard. Back in PuTTY, right-click the mouse anywhere in the window to paste your key at the current cursor position. Make sure the whole thing got pasted. It should start with "ssh-dss" and end with whatever is in the Key Comment text box in PuTTYgen.

Save the file and exit the editor. In vi, hit Esc then type ":wq" and hit enter.

You can close PuTTYgen now.

  • Setting file permissions

For security reasons, SSH will not authenticate your logins using your public key if the authorized_keys file, the .ssh directory, or your home directory can be written to by any user but you. Run this command:

chmod go-w ~ ~/.ssh ~/.ssh/authorized_keys

This removes write permissions for the specified directories and file without affecting the other existing permissions.

You can close PuTTY now.

  • Using Pageant to load your private key

Back at the command prompt, type "pageant" and hit Enter. An icon of a computer wearing a hat should appear in your system tray.

Double-click the icon. In the window that comes up, click the Add Key button and open the .ppk file containing your private key. Enter the passphrase for your private key when prompted. An entry for that key should show up in the Pageant key list. Close the key list window and Pageant will continue to run in the system tray with your private key loaded.

  • Installing TortoiseCVS

Get tortoiseCVS from here: http://prdownloads.sourceforge.net/tortoisecvs/TortoiseCVS-1.8.22.exe

Run install from download location accepting all of the defaults. Reboot is not necessary.

  • Using TortoiseCVS

Create your sandbox directory i.e. c:sandboxpvalentino

Right click inside the empty sandbox folder to do first checkout and select CVS Checkout command

Enter following string in CVSROOT field substituting your own user name for paulv

:ext:paulv@dev.gopvalentino.com:/cvsroot

Place a “.” Or module name in the Module field and select OK to do first checkout.

If all is well you will not be prompted for password.

No comments: