Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 was trying to set up an sftp account and one of the forums suggessted that we comment out PAM access. I now think that is how the user ubuntu has access and so I can no longer access my ec2 instance as ubuntu as its asking for a password now. How do I regain access to my sshd file to revert back?

share|improve this question

I found the following possible solution: To regain control, you'd have to mount the volume of the affected instance to a different instance, revert the changes made to the sshd file and mount back as /dev/sda1 to the orginal. It would/could have worked yet I accidentally formatted the volume while following another tutorial... whoops! Hope this helps others at least.

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.