0

I have created an instance of amazon unix/linux on aws ec2, when i tried to access my instance from my ubuntu console I am getting an error "ssh -i mpigeon.pem ec2-50-17-134-152.compute-1.amazonaws.com Permission denied (publickey)."

What is the issue how do I resolve it

Jeevan Dongre
  • 4,627
  • 13
  • 67
  • 129
  • You didn't get the chance to put in a username? If so what AMI are you using and which username? – arnorhs Mar 16 '11 at 08:26
  • possible duplicate of [AWS ssh access 'Permission denied (publickey)' issue](http://stackoverflow.com/questions/1454629/aws-ssh-access-permission-denied-publickey-issue) – CtheGood Jul 29 '15 at 15:35

1 Answers1

5

You need to mention the user name while login into instance.

ssh -i mpigeon.pem root@ec2-50-17-134-152.compute-1.amazonaws.com

If you are using ubuntu instance, default user in ubuntu. Replace root user with ubuntu user else for centos and fedora, default user is root only.

Mohammad Anini
  • 5,073
  • 4
  • 35
  • 46
Sanket Dangi
  • 1,185
  • 9
  • 16
  • I have switched to the ubuntu instance now, I am able to access the instance now I need to install apache tomcat and also java – Jeevan Dongre Mar 16 '11 at 11:28