Add EC2 pem key permanently to ssh

Add your pem key to SSH so you do not have to manually specify it when connecting to EC2 instances.

With this command:

    ssh-add ~/.ssh/KEY_PAIR_NAME.pem

You can do this:

    ssh ec2-instance.amazonaws.com

instead of:

    ssh -i ~/.ssh/KEY_PAIR_NAME.pem ec2-instance.amazonaws.com

Published: July 23 2013

blog comments powered by Disqus