where do I keep my amazon .pem file on a mac

leblaireau picture leblaireau · Sep 2, 2014 · Viewed 32.1k times · Source

Where should I keep this file for security? At the moment it is on my desktop - should I put it somewhere else?

Answer

Daniel Scott picture Daniel Scott · Sep 2, 2014

The 'standard' location would be a .ssh directory in your $HOME. i.e.

/Users/$USER/.ssh/

You should protect this directory with permissions 700. You can setup a config file to automatically use the .pem, and set the username when sshing to EC2 instances.