Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm attempting to connect to my EC2 Ubuntu instance via SSH with my private key. I had no problem connecting to the server before using the sudo reboot command.

Now, I cannot connect to the instance using any of the keys that I have set up on this instance. I had also set up a backdoor user that could be used to log in to the instance in the event that this happened and I cannot log in with this user either.

No matter what I do, I receive a permission denied (publickey) response. I attempted to restart the instance from the EC2 web console, and the restart action did nothing. I've since been able to stop the instance and attach its root volume to another instance and the SSH config looks fine to me.

Any suggestions for what I could look for?

share|improve this question
If you restarted your instance, your ip may have changed, did you double-check that you're trying to connect to the correct instance? – Boris Guéry Feb 5 '14 at 15:35
Hey, I've already had this out with AWS Support multiple times. I'm not that much of an amateur that I'm not checking the IP of the server. I've checked the IP (from the EC2 console), the key file, the permissions of the key file, the sshd_config file, the authorized_keys file. I've checked EVERYTHING and it's all okay. Thanks for the suggestion, though. – Martin Tracey Feb 8 '14 at 20:53
You can mount the disk to another EC2 and investigate. – Drew Khoury Feb 18 '14 at 8:17

In your case, I would create an AMI of this instance and launch a test box with associated PEM key you have.

When it clears status checks you should then be able to get back into the box with your private key. If not, that particular service may be down. I am surprised AWS support was unable to help.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.