SSH and Private Key usage on Mac OS X

It’s very important that your private keys are kept secure and away from prying eyes.

A good place to keep your private keys is in the folder ~/.ssh as this makes it easier to manage (this is a subfolder of your home folder).

You then want to set the permissions of the private key file to 600.

chmod 600 ~/.ssh/privatekeyfile.pem

Then you can ssh to the server from the command line using:

ssh -i ~/.ssh/privatekeyfile.pem.pem root@fqdn -p 22

Written on June 7, 2016