SyntaxFix
Write A Post
Hire A Developer
Questions
In addition to the other answers, here is what I did in order for this to work:
cp key.pem ~/.ssh/key.pem
chmod 400 ~/.ssh/key.pem
eval `ssh-agent -s` ssh-add
ssh-add ~/.ssh/key.pem
Now you should be able to ssh EC2 (: