By default, the system adds keys for all identities to the /Users/yourname/.ssh directory. The following procedure creates a default identity.
manthony@PHOENIX ~
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Documents and Settings/manthony/.ssh/id_
rsa):
manthony@PHOENIX ~
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Documents and Settings/manthony/.ssh/id_
rsa): /c/Documents and Settings/manthony/My Documents/keys/my-new-ssh-key
manthony@MANTHONY-PC ~
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/manthony/.ssh/id_rsa):
Created directory '/c/Users/manthony/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/manthony/.ssh/id_rsa.
Your public key has been saved in /c/Users/manthony/.ssh/id_rsa.pub.
The key fingerprint is:
e7:94:d1:a3:02:ee:38:6e:a4:5e:26:a3:a9:f4:95:d4 manthony@MANTHONY-PC
manthony@MANTHONY-PC ~
$
|
$ ls ~/.ssh id_rsa id_rsa.pub |
The command created two files, one for the public key ( for example id_rsa.pub ) and one for the private key (for example, id_rsa ).