Connecting to EC2 instance:Permission denied (publickey) error

September 22, 2011 § Leave a comment

You connect to your Ec2 instance by:

ssh  -i private.pem {user}@{ip}

Where:

private.pem is your Amazon key pairs file

user is the login name, this is the problem usually, and it’s NOT always root or ec2-user, different AMIs use different login name, so you really have to see the documentation for your AMI. for instance, Ubuntu releases by Canonical use the user ‘ubuntu’, where Ubuntu releases by bitnami use ‘bitnami’ as the default user.

ip is your instance public ip, could be like this ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com

Advertisements

Tagged: , , , , ,

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

What’s this?

You are currently reading Connecting to EC2 instance:Permission denied (publickey) error at Mohamed Elbou.

meta

%d bloggers like this: