root locked out of EC2

Posted by Paco on Server Fault See other posts from Server Fault or by Paco
Published on 2009-05-21T05:25:23Z Indexed on 2010/05/25 8:41 UTC
Read the original article Hit count: 250

Filed under:
|

I was in the process of disabling root logins on an AWS EC2 instance. Right after setting PermitRootLogin no and restarting sshd, I closed the terminal on accident -- before setting up users with sudo privileges. The result is that my key to get into the instance as root does not work (sshd forbids it) and when I log into the instance using my regular user I can't gain root privileges (the root password was never set). The instance is running ubuntu 8.10. Anyone have any idea how can I fix this?

© Server Fault or respective owner

Related posts about ssh

Related posts about amazon-ec2