Creating and Placing Your Encryption Keys


On the remote system, run

  ssh-keygen

One of the following pairs of files should be created:

  .ssh/identity and .ssh/identity.pub
  .ssh/id_dsa and .ssh/id_dsa.pub
  .ssh2/id_dsa_1024_a and .ssh2/id_dsa_1024_a.pub*

- Email the new .pub file to MSRI, or

- Copy and paste the contents of the .pub file

Append the .pub file's contents to your account's .ssh/authorized_keys file at MSRI

* if the public key is .ssh2/id_dsa_1024_a.pub, you'll have to save it at msri as .ssh/id_dsa_1024_a.pub and run

'ssh-keygen -i -f .ssh/id_dsa_1024_a.pub >> .ssh/authorized_keys'

Prev/Next

When you run ssh-keygen, you'll first be asked for the filename to be used for your new private key (I'm assuming that you chose the default name) and for your passphrase.

The public key file can only be used to give you further access to things so it doesn't matter if someone else gets a hold of it.

The reason for the extra step when using SSH2 public keys is twofold. One, remember that SSH2 uses the authorization file instead of the authorized_keys file. The second reason is that OpenSSH uses a different key format - the -i option tells ssh-keygen to convert the key from SSH2 format to OpenSSH format.

If you choose to use non-default names when generating your ssh keys, or if you decide to use more than one private key for a particular account, you should look at the Advanced Topics section on configuring ssh.