I have created a micro instance in EC2. When I followed to login into instance using putty (I have followed all steps given in amazon to login through putty). It is throwing error "server refused our key". I have created two tags with name admin and root(with different passwords). (I am using same as a users for logging).

These are system logs:

Master Resource Control: runlevel 3 has been reached

Failed services in runlevel 3: 

Skipped services in runlevel 3: microcode.ctl nfs irq_balancer splash smartd

AMI id is : ami-74146a26, I am using the private key , I have followed process what have mentioned here in this link, and when I tried to login as root and ec2-user. still it is throwging same error "Server refused our key " I have opened the added the SSH and HTTP in security group. still same issue

migrated from stackoverflow.com Nov 3 '11 at 12:38

This question came from our site for professional and enthusiast programmers.

  • What is the AMI id you are running and in what EC2 region? – Eric Hammond Nov 2 '11 at 9:25
  • this is my amazon id : ap-southeast-1.compute.amazonaws.com – Kiran kumar Nov 2 '11 at 12:08
  • An AMI id starts with "ami-". – Eric Hammond Nov 2 '11 at 20:18
  • ami-74146a26 in ap-southeast-1 (SUSE Linux Enterprise Server 11) accepts ssh just fine using "root@". Your issue must be somewhere in the security group permissions, ssh key, or Putty usage. – Eric Hammond Nov 3 '11 at 21:21

When you launched your server you would have specified an SSH key pair.

If you launched an Ubuntu server, that key pair is likely for the ubuntu user. Otherwise it's probably for the root user.

Make sure you have a local copy of that private key on your computer.

Using Putty, SSH as the ubuntu or root user with that private key specified.

If you are still having problems, try using Plink and add your command and output to your original question.

An example of how you might use Plink:

plink -i C:\Path\To\Your\Private\Key\File -v root@your.server.public.hostname.com
  • AMI id is : ami-74146a26, i am using the private key , i have followed process what have mentioned here in this link: docs.amazonwebservices.com/AmazonEC2/gsg/2007-01-19/putty.html, and when i am logging as root also it is throwging same error "Server refused our key " – Kiran kumar Nov 3 '11 at 4:31
  • In that case, I think you need to update your question with more details about your usage of Putty. As Eric has hinted, your problem is probably in how you're using Putty, your SSH key, or your security groups. – cloudartisan Nov 4 '11 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy