Setting up SSH Keys

The idea is the following

  1. SSH into the machine once to make sure the machine is on the list of known_hosts
  2. Generate the rsa key on the machine from which I am SSH'ing. Use the command: ssh-keygen -t rsa. Typically skip the use of the passphrase.
  3. Add the key (found in the text of ~/.ssh/id_rsa.pub) to the ~/.ssh/authorized_keys file on the server into which I am SSH'ing.

Here is a helpful link, but notice that they generate the rsa key on the server and then distribute the server's identity to the clients. I prefer to do it the other way around, so I have a server with one long authorized_keys file.


Home

Valid XHTML 1.1!