Just a basic memory aid.
Create a new key using the email address as label
$ ssh-keygen -t rsa -C "[email protected]"
Accept the default name (~/.ssh/id_rsa) or provide another for multiple identities
Force ssh to use a specific private key
ssh -i ~/.ssh/<private-key-file> [email protected]
To automatically select identity file to use per host, add entries to ~/.ssh/config
Host hostname1 hostname1.server.com
HostName hostname1.server.com
User root
IdentityFile ~/.ssh/<private-key-file1>
Host hostname2
IdentifyFile ~/.ssh/<private-key-file2>
Host - the list of names that can match HostName - the real hostname User - the user to log in as, if you don't want to specify on the command line IdentifyFile - the private key to use
Remember to actually specify a different identity file name when using ssh-keygen
There is a typo: IdentifyFile should be IdentityFile (7th letter should be 't'). This happened in two places.