Using SSH Keys in Windows 98/2000/XP/Vista

Generating an SSH Key Pair

As a Windows user, your best bet is to use the free SSH Control online key generator.

  1. Go to http://sshcontrol.com/ssh_keys/generate
  2. Enter a passphrase and click 'Generate'. The passphrase will be used to encrypt your private key and will be needed in establishing an authenticated connection to your SSH Control repositories.
  3. The website will generate a file called 'sshkeys.zip'. Save the file to a location on your computer.
  4. Unzip/extract the sshkeys.zip file.

Extracting the zip file will give you two files, id_rsa and id_rsa.pub, your private and public keys, respectively.

The next sections explain how to use your newly generated SSH key pair, using PuTTYgen and Pageant. Also note that you could have also chosen to generate an SSH key pair using PuTTYgen. For instructions on how to do this, visit Using Keys Generated by PuTTYgen.

Uploading A Public Key to SSH Control

There are two instances when you will want to upload a public key to SSH Control:

  1. Setting your Profile SSH Key (click the Profile button when you are logged into the Member Portal)
    Add_profile_ssh_key
  2. Adding an SSH Key to a project you created yourself or to which you were invited (click the 'custom key' button in the Project and Assignment pages)
    Add_key_to_project

Uploading a public key is easy, but remember not to confuse it with your private key. Public keys will usually have the file extexsion '.pub' to distinguish it from its associated private key.

Copy and paste the contents of your public key into the form on SSHControl.com when prompted to enter an SSH Public Key. You can do this in the following way:

  1. Open id_rsa.pub using Notepad.
  2. Select the file's contents by pressing Ctrl+A.
  3. Copy the selected text by pressing Ctrl+C.
  4. In the SSHControl.com form field, press Ctrl+V to paste.

When you press the button to save your key, we will let you know if the key you submitted is valid or not.

If you are having difficulty pasting a valid public SSH key into the website form, you may be using a PuTTYgen public SSH key. If this is the case, review Using Keys Generated by PuTTYgen for information on how to upload keys generated by PuTTYgen.

Using an SSH-Agent

You will soon find typing in your SSH passphrase for every checkin or update can be quite tedious if you interact with your repositories multiple times a day. Using an agent, however, will only require you to type your passphrase once. Here's how you can get started with an SSH agent (assuming you have already gone through the steps of generating an SSH key pair).

The following steps, 1 through 5, are only applicable to you if you did not generate an SSH key pair using PuTTYgen. These steps will show you how import your private key into PuTTYgen to create a PuTTY compatible private key (with a ".ppk" file extension). Otherwise, skip to step 6.

  1. Download PuTTYgen, the PuTTY Key Generator for Windows, from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
  2. Launch the PuTTYgen application.

  3. Click 'Load' to import a private key.

  4. Navigate to your private key and click 'Open'. You may have to select "All Files *.*" for the "files of type" dropdown in order to find your private key. Remember, usually your private key will not have a file extension, unlike your public key which has the extension ".pub". If you can't distinguish between your private key and public key in the Windows navigation screen because they have the same base name and file extensions are not visible, try one file first and PuTTYgen will let you know whether or not you selected a private key.

  5. After you type in the passphrase for your private key, click 'Save private key'. This will create a private key which will work with Pageant, your SSH agent.

  6. Download Pageant from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
  7. Launch the Pageant application.

  8. Double-click the Pageant icon in your System tray. (The icon looks like a computer wearing a hat.)


    Pageanticon
  9. Click the 'Add Key' button.

  10. Navigate to your private SSH key (with ".ppk" file extension) and click 'Open'. This will add the key to Pageant's key chain.

After you type in your passphrase for your private key, your agent will automatically try to use that key (and any other keys on its key chain) when trying to establish an SSH connection. That means, next time you issue a 'svn update', 'git pull', 'hg push', or any other command which will communicate with your SSH Control repository, you won't have to type in your passphrase.