2

This is my first foray into using EC2, and I created my first instance using an Amazon AMI running Ubuntu 12.04. I created a keypair and downloaded the .pem file to my local machine. I was able to connect via SSH via the ubuntu user just fine. I then created another user using the useradd command, and after a few tries, it was finally created. However, somehow in the process of creating that user, the default ubuntu user was deleted. I logged out of the instance, and now when I try to log in as my new user account, I get "Permission denied (access key)." I didn't have my public key created in my .ssh directory for my new user on the server, but even so, shouldn't I still be able to use SSH with my password? That's what has worked for me on other servers.

I've tried importing another key pair in the management console, but that hasn't helped. In terms of access groups, I just have the default group that grants access on port 22.

If I can't get in, it seems my only other option is to delete the instance and create another one. Is there a way to access the one I have?

Thanks.

1 Answer 1

4

Many EC2 AMIs, especially Ubuntu's, have SSH password authentication disabled by default. So if you don't have a key in place, you can't log in, at all.

If you only just created the instance, then delete it and start over.

1
  • Save a snapshot before making major changes. Messing with anything that changes admin access is a major change. It's easier to step back than to recover with EC2. Jun 2, 2013 at 19:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .