10.4.4.5. Authentication keys
The ssh-keygen command generates, manages
and converts authentication keys for ssh. It
can create RSA keys for use by SSH protocol version 1 and RSA or
DSA keys for use by SSH protocol version 2.
Normally each user wishing to use SSH with RSA or DSA
authentication runs this once to create the authentication key in
$HOME/.ssh/identity, id_dsa or id_rsa.
Additionally, the system administrator may use this to generate
host keys for the system.
Normally this program generates the key and asks for a file in
which to store the private key. The public key is stored in a file
with the same name but .pub appended. The program also
asks for a passphrase. The passphrase may be empty to indicate no
passphrase (host keys must have an empty passphrase), or it may be
a string of arbitrary length.
There is no way to recover a lost passphrase. If the passphrase
is lost or forgotten, a new key must be generated and copied to the
corresponding public keys.
We will study SSH keys in the exercises. All information can be
found in the man or Info
pages.