I'm not sure exactly what caused the problem but I'll tell you know I know.
I created an amazon ec2 instance and was using public/private key authentication to ssh in as the default ubuntu user. Everything was working fine until...
I had to create another user and give her ssh access. I wanted to give her a user/password login. So I added her as a non-sudo user and then modified my sshd_config. These are the two settings
PasswordAuthentication yes ### changed from no
AllowedUsers newuser1 ### this line was created
I tested to make sure I could ssh in with the new user and her password.
I also didn't want that user to be able to access or view my root user's home directory. So I executed "chmod -R o-rx /home/ubuntu".
The next day I try to ssh in as ubuntu as normal and the system prompts me for a password. Unfortunately I never set/changed the default user's password and I don't know what it is. I'm not sure why it's not just letting me log in with my private key.
Could it be my ssh server settings? Did I accidentally require passwords for all accounts even if their public key is in the ~/.ssh/authorized_keys file? Or did my changing of read/execute permissions on the ubuntu user prevent the reading of its authorized_keys file by the system?
Also, what can I do to log in as the root user again? I can still log in as the newuser but it doesn't have sudo privileges and I can't become a sudo user since I don't have the password.
Please help. Thanks in advance