title: Prompted for password by ssh when trying to connect to Amazon EC2 instance
body: <p>I've followed a couple of tutorials for creating an Amazon EC2 instance using the command line tools</p>
  
  <p><a href="http://www.zabada.com/tutorials/deploying-a-rails-application-to-production-on-amazon-ec2.php" rel="nofollow">http://www.zabada.com/tutorials/deploying-a-rails-application-to-production-on-amazon-ec2.php</a>
  http://www.smartfrog.org/wiki/display/sf/Starting+an+EC2+Image+by+Hand</p>
  
  <p>and all is well, i</p>
  
  <ul>
  <li>ec2-add-keypair (directing the output of ec2-add-keypair directly to a file in ~/.ssh)</li>
  <li>chmod 600 the keypair</li>
  <li>ec2-run-instance</li>
  <li>ec2-describe-instances</li>
  </ul>
  
  <p>then, when the new instance is running try to ssh on</p>
  
  <p>ssh -i ~/.ssh/ec2-keypair ec2-user@foo.bar.amazon.com</p>
  
  <p>At this point i'm ALWAYS prompted for a password. Obviously there's no password so it always refuses me access.</p>
  
  <p>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?</p>
  
  <p>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).</p>
  
  <p>Anyone have any ideas or suggestions?</p>