Installing the PuTTY SSH Client for Windows


PuTTY is a GUI Windows client that makes it easy to use the SSH (secure shell) protocol to connect your Windows PC to a Linux server hosting a CVS repository

Installing an SSH client and generating your personal SSH keys must be done before you can be given a user account to connect to the CVS server.

Why PuTTY?

There are a number of free and commercial SSH clients available for Windows. These instructions tell you how to install and configure one of these clients: PuTTY.
PuTTY is commonly selected because it is a self-contained product with native Win32 binaries that includes an easy-to-use GUI interface and offers very robust support for the SSH2 protocol.
If you already use the Cygwin (Unix-for-windows) product, you may wish to use the OpenSSH client that comes with Cygwin instead PuTTY. However, detailed instructions for this option are not included in this document.

Installing PuTTY


  1. Create a directory called putty on your C or D drive. This will be referred to as d:\putty in the instructions that follow.


  1. Download the code from to your new d:\putty folder.


  1. Now run the putty.exe program. The PuTTY Configuration dialog will be displayed.


  1. Under the Session category, set these options:
              Host Name --> Server you are connecting to
              Protocol  --> SSH
  2. Select the Terminal option in the left pane and turn on the option Use background colour to erase screen.


  1. Select the Connection option in the left pane and enter your user name in the Auto-login username box.Remember, Linux is case sensitive, be sure you enter your user name in lowercase since this is the way the CVS Administrator will normally set up your account on the CVS server.


  1. Next select the SSH option under the Connection category in the left pane. Under Preferred SSH protocol version select 2.


  1. Select the Auth option and de-select the Attempt keyboard-interactive authentication (SSH2) option.


  1. Now go back the Session category and type ServerName into the Saved Sessions box as appropriate. Click on the SAVE button to store your CVS session options.

Configure Connection to CVS Server


  1. Next use the instructions in Configure SSH Keys to create and install your SSH authentication keys.


  1. Install your SSH public key on the CVS server. Now you can configure PuTTY to use your SSH keys to make the connection to the CVS server.


  1. Run PuTTY.exe and click on the LOAD button to load your ServerName settings as appropriate.


  1. Choose the Connection–>SSH–>Auth option in the left pane and enter the name of your private key file into the box shown in the right pane. The name of this file will be something like:
  2. Click on the Session category in the left pane and use the SAVE button to save your updated ServerName session settings.
  3. Now click on OPEN to try establishing a connection to the CVS server. The first time you connect, you should get a PuTTY security alert message that gives you the fingerprint of the CVS server.
  4. If you do see the correct fingerprint, click on YES. PuTTY will store this fingerprint in the Windows registry and you won’t get this prompt on future connections.
  5. PuTTY will now connect to the CVS server. You should see messages like these:
              Using username your-user-name.
              Authenticating with public key "ServerName Server rsa-key-yyyymmdd"
              Pass-phrase for key "... rsa-key-yyyymmdd:
  6. Enter your pass-phrase and you will be logged in to the CVS server. If you cannot log-on to the CVS server, contact the CVS Administrator and ask the admin to check your user account on the CVS server.


Configure SSH Agent for CVS Client/Server Connections

  1. Now you can configure PuTTY to automatically connect you to the CVS server using your authentication keys instead of prompting you for your SSH pass-phrase each time. By using the SSH agent program called pageant, you will only have to enter your SSH pass-phrase once when you boot your PC. The SSH Agent will then keep your SSH key loaded in memory and automatically provide it each time your CVS client(s) need to connect to the CVS server until the next time you reboot.


  1. Using Windows Explorer, go to your d:\putty directory. Right-click on the pageant.exe program and create a shortcut.


  1. Right-click on the your new pageant shortcut.
    1. Use the RENAME option to change the name of the
      shortcut to SSH-Agent.
    2. Use the PROPERTIES option and click on the SHORTCUT tab. Add the name of your private key file to the pageant run command in the TARGET box so that the run command looks like this:
                    d:\putty\pageant.exe d:\putty\.ssh\identity
    3. Click on the OK button to save your changes.
  2. Now double-click on your SSH-Agent shortcut to run the pageant program.
  3. The pageant program will prompt you for the pass-phrase for your SSH key. Enter your pass phrase and click on OK.
  4. You should now see the pageant icon in your system tray at the bottom right-hand corner of your screen.
  5. Right-click on the pageant icon and select the VIEW KEYS option. Pageant will open a window with a list of the SSH keys it has loaded. You should see the fingerprint for your private key listed in this window.
  6. Close the pageant key list window.
  7. Now double-click on the putty.exe program again and ask it to connect to the CVS server. This time putty should automatically connect to the CVS server. You should see the following messages:
              Using username your-user-name.
              Authenticating with public key "CVS Server rsa-key-yyyymmdd" from agent
              Last login: date-and-time from your-workstation-name

    By the way, the last login message is also a security aid. If you notice a last login time or workstation that are not yours, please notify the CVS Administrator immediately.


  1. You may want to copy your SSH-Agent shortcut to your Windows startup folder so that it will automatically run and load your SSH key(s) each time you reboot your PC.


Configure Plink for Background Connections

  1. The final step in PuTTY configuration is to set up the plink tool so that it can be used for automatic background connections from your PC to the CVS server.


  1. First make two changes to the environment variables on your

    1. Add the d:\putty directory to your system PATH environment variable using the System option in the Windows Control Panel.
  1. Create a new system environment variable called CVS_RSH with a value of d:\putty\plink.
  2. Reboot your PC to make the new environment settings take effect.
  • Now test plink. Open a DOS command shell and enter the command:
              plink ServerName echo $HOSTNAME $USER $HOME

    You should see a response that looks something like this:

              ServerName username /home/username

    Note – The ServerName in the plink command is the name of the PuTTY session configuration you saved earlier in this procedure.
    Note – If you have trouble connecting with plink try this command instead:

               plink -v ServerName echo $HOSTNAME $USER $HOME

    The -v option will cause plink to write diagnostic messages as it connects to the CVS server. These messages can help you pin down the problem with your connection.


Congratulations, you have now completed all the SSH setup
needed connect to the CVS server.



This page is based on an internal page written by Bruce Files at MPCT (later Aleri) in Chicago. It has been modified to make it a generic guide suitable for publication on the internet.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.