EC2 Keypairs

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

Advertisements

Leave a comment

No comments yet.

Comments RSS TrackBack Identifier URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s