Configuring SSH Keys

Overview

Once you have installed PuTTY but before you can connect to the CVS server, you must create your SSH authentication keys.
SSH authentication keys are a more secure way of controlling access to the CVS server. Once configured they will allow you to connect to the CVS server without entering a log-on name and password – this is important since most of the time your connections to the CVS server will actually be made by your CVS client and these CVS-to-CVS connections could be disrupted by prompts for user name and
password.

SSH key authentication requires that you create two keys. One is your
PUBLIC key. This is a key you can share with anyone. This key will be stored on the CVS server. The second key is your PRIVATE key. You must make sure you keep your private key secure. This is especially true if you are using a laptop, working off-site, or working from home.

Instructions

 

  1. First open a DOS shell (CMD.EXE) and create a .ssh directory in your putty directory
          cd /D d:\putty
          mkdir .ssh

    Note – Windows Explorer will not allow you to create a directory that starts with a period.

 

  1. Run the PuTTYGen program to create your SSH authentication keys.

 

  1. For Type of key to generate select SSH2 RSA.

 

  1. The Number of bits in a generated key should be set to 1024.

 

  1. Click on the GENERATE button to start key generation.

 

  1. A progress bar will appear and you will be asked to move your mouse around to ‘generate randomness’. Move your mouse around until the first progress bar fills up. Then key generation will start and may take a minute or two.

 

  1. A new dialog box will appear with your public key when the key generation completes.

 

  1. You should pre-pend ServerName to the Key Comment box. This will make life easier if you add additional SSH keys in the future for other purposes.

 

  1. Next type in a Key passphrase. This should be a phrase of three or more ‘words’ that will be used to encrypt and protect your private key. Don’t use dictionary words and try to mix numbers and upper/lower-case letters in your pass phrase.One recommended technique is to think of a phase you will find easy to remember, then deliberately introduce some misspellings and numbers into the words.Warning – do not forget your key pass phrase. There is no way to recover it. If you forget it, you will have to generate a new pair of SSH keys.

 

  1. Now click on the SAVE PUBLIC KEY button and save your public key to the file: d:\putty\.ssh\identity.pub.

 

  1. Next click on the SAVE PRIVATE KEY button and save your private key to the file: d:\putty\.ssh\identity.

 

  1. Use your mouse to select your entire public key from the Public key for pasting into authorized_keys file box. The public key information will be automatically copied to the Windows clipboard.

 

  1. Now install your new SSH public key into the appropriate area on the Linux Server.

 

  1. Use the CLOSE button at the top-right of the PuTTY Key Generator window to exit from the PuTTYGen program.

 

  1. Return to the Installing the PuTTY SSH Client for Windows instructions to complete configuration of SSH.

 

Credits

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.

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