Creating a new (RSA) key pair on the Mac
...in this example, for later use on Amazon Web Services (AWS)
Getting the contents of the public part
...which I will need to copy later, when importing this key into AWS so that I can use it to access my EC2 instance
Making this new key the primary/default one
...
When logging in to a server for the first time, you should immediately verify that the fingerprint it tells you is valid.
[OS X notes]
needs "id_rsa" key to exist in "~/.ssh/"
(probably should be password-less?)
If "id_rsa" exists, and this is not the key currently used to access your EC2 instances, then rename this existing key to something else (for example "id_rsa-existing")
make a symbolic link to the key being used for EC2 access
change the permissions mode of that link
$ mv ~/.ssh/id_rsa ~/.ssh/id_rsa-previous
$ ln -s ~/.ssh/my-ssh-key-for-ec2.pem ~/.ssh/id_rsa
$ chmod -h 600 ~/.ssh/id_rsa