Creating a Public/Private key pair

  • If you have previously generated a Public/Private key pair, sending your existing Public key is fine (although you might need to re-copy/paste it from PuTTY to make sure it is in OpenSSH format), otherwise follow the following steps for your platform.


  • Open a Terminal window (/Applications/Utilities/
  • In the Terminal window type: ssh-keygen -t rsa

  • It will display: Generating public/private rsa key pair.

    • Enter file in which to save the key (/home/<your_username>/.ssh/id_rsa):

  • Either select the default (recommended) or change the location/name of the file and press Return
  • Enter a password to protect your key:
    • Enter passphrase (empty for no passphrase): **********
      (Nothing will actually be displayed, even stars) Enter same passphrase again: **********

  • At the conclusion it will display:
    • Your identification has been saved in /home/<your_username>/.ssh/id_rsa.
      Your public key has been saved in /home/<your_username>/.ssh/

    Note: In place of “**********” enter your own password.

You can then send your “” file. Do NOT send the “id_rsa” file.


  • If you do not already have it, you will need at least PuTTYgen, but you might as well get all PuTTY utilities from here

  • Then, to generate the keypair
  • Run PuTTYgen.
  • Select the option towards the bottom that says “SSH-2 RSA”.
  • Click “Generate”.
  • Copy the contents of the large textbox at the top where it says “Key” and save it using Notepad instead of Wordpad. Then send this file to [ ]. The key needs to be in OpenSSH format, which is why you need to copy the contents of the textbox.

  • Enter your passphrase twice.
  • Then “Save public key” and “Save private key”. This will save the keypair to your computer. Do not send either of these keys.
  • When saving your private key, make sure that it is in the “.ppk” format.



  • Using a pre-generated keypair
    • If you have already generated a key, say from a different machine, and you want to reuse it, you may just use PuTTYGen to load the private key, and then use the “Save Private Key” to convert it into a PPK format (PuTTY format).