Quick guide to SSH keys
To simplify remote logins you can use ssh keys. Information is stored
below "$HOME/.ssh". Starting from scratch on a system execute the
command:
ssh-keygen -t rsa
This generates a public/private key set. You do this once on a system
from which you will want to provide authentication. You will normally
choose the default directory. If a pass-phrase is used you need to
enter that pass-phrase at least once on the machine requesting
authentication. See "ssh-agent" man page for information about keeping
an authentication key in memory. If you do not use a pass-phrase things
are a bit simpler at the expense of security.
The ssh-keygen command creates files:
.ssh/id_rsa
.ssh/id_rsa.pub
You will copy the .ssh/id_rsa.pub key to another machine. This file can copied as:
scp -p .ssh/id_rsa.pub remotesys:.ssh/authorized_keys
If you wish to grant multiple systems remote access you need to
cut/paste the id_rsa.pub file from the machine which executed
ssh-keygen such that multiple entries are placed in the authorized_keys
file. Place entries one per line. You can also append the entry
like so:
cat ~/.ssh/id_rsa.pub | ssh -l userid hostname "cat - >>.ssh/authorized_keys"
The .ssh directory must have permission 700.