Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prompted for password by ssh when trying to connect to Amazon EC2 instance

I've followed a couple of tutorials for creating an Amazon EC2 instance using the command line tools

http://www.zabada.com/tutorials/deploying-a-rails-application-to-production-on-amazon-ec2.php http://www.smartfrog.org/wiki/display/sf/Starting+an+EC2+Image+by+Hand

and all is well, i

  • ec2-add-keypair (directing the output of ec2-add-keypair directly to a file in ~/.ssh)
  • chmod 600 the keypair
  • ec2-run-instance
  • ec2-describe-instances

then, when the new instance is running try to ssh on

ssh -i ~/.ssh/ec2-keypair [email protected]

At this point i'm ALWAYS prompted for a password. Obviously there's no password so it always refuses me access.

My question is, what am i doing wrong here? Why am i being prompted for a password and how can i put this right so i can ssh onto the machine i've just started?

I'm guessing this is something to do with my local setup, but as far as i know this machine hasn't had anything custom done with .ssh (there's certainly no config file or anything like that lying around that might be screwing with things).

Anyone have any ideas or suggestions?

like image 311
Trevor Avatar asked Oct 24 '22 21:10

Trevor


1 Answers

ec2-user@ ? Why not root@ ?

like image 65
chx Avatar answered Nov 03 '22 05:11

chx