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.

Mac

  • Open a Terminal window (/Applications/Utilities/Terminal.app)
  • 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/id_rsa.pub.

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

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

Windows

  • 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 [ fspituls@eng.ucsd.edu ]. 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.

SELECT SSH-2 RSA, NOT SSH-2 DSA

SELECT SSH-2 RSA, NOT SSH-2 DSA

  • 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).