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?
1 Answer
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.