amazon web services - AWS ssh access 'Permission denied (publickey)' issue

ID : 10210

viewed : 54

Tags : ssh-keys

Top 5 Answer for amazon web services - AWS ssh access 'Permission denied (publickey)' issue

vote vote

91

For Ubuntu instances:

chmod 600 ec2-keypair.pem ssh -v -i ec2-keypair.pem ubuntu@ec2-174-129-185-190.compute-1.amazonaws.com 

For other instances, you might have to use ec2-user instead of ubuntu.

Most EC2 Linux images I've used only have the root user created by default.

See also: http://www.youtube.com/watch?v=WBro0TEAd7g

vote vote

83

Now it's:

ssh -v -i ec2-keypair.pem ec2-user@[yourdnsaddress] 
vote vote

72

Canonical's releases use the user 'ubuntu' by default for anyone landing here with a ubuntu image that is coming up with the same problem.

vote vote

62

If you're using a Bitnami image, log in as 'bitnami'.

Seems obvious, but something I overlooked.

vote vote

54

For my ubuntu images, it is actually ubuntu user and NOT the ec2-user ;)

Top 3 video Explaining amazon web services - AWS ssh access 'Permission denied (publickey)' issue

Related QUESTION?