Setting up SSH keys

 We recommend using ssh keys if you want to login to another account (such as a class account) via SSH.

To generate the ssh key on a Linux command line, use the "ssh-keygen" command:
$ ssh-keygen -t rsa

You will be prompted with a few questions - usually the defaults will be fine. Creating a passphrase is one of the questions you will be prompted with during key creation.

If you need to add a passphrase to an existing key, use the following command:

 $ ssh-keygen -p

You will be prompted for the name of the file in which the key is. Unless you have multiple keys, the default should be fine. Enter a passphrase that is easy to remember but hard to figure out. Be sure to use something you can remember, because if you forget the passphrase, the key is useless. 

Next, copy the contents of ~/.ssh/ to the file ~/.ssh/authorized_keys

Now, when you ssh between COE machines, your ssh key will be used, instead of password authentication.

Note: If you are a TA who needs access to a class account via SSH keys, please see our FAQ entry SSH access to CS class accounts for Teaching Assistants.

Last update:
2013-10-09 00:08
Troy Smith
Average rating: 5 (1 Vote)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.