Had not touched this for a while and got stuck trying to log into a new instance on EC2. Tried a few options and kept getting “Permission denied (publickey).”
So here are the gotcha’s
1) You need to use the correct keypair.
2) Use you private key
3) Log in a a specific user
For an Ubuntu instance with a private keypair called mykeys.pem
ssh -v -l ubuntu -i mykeys.pem ec2-some-ip.com
Leave a comment
No comments yet.