Certified Security - Specialty

Sign Up Free or Log In to participate!

With new private key, user login changed

This is a comment/quetion

I followed all the steps in this lecture and something strange happened when I tried to login with the newly created key that I downloaded from the S3 bucket:

when I tried to login with ec2-user, I got a

Permission denied (publickey,gssapi-keyex,gssapi-with-mic). 

error.  When I tried with "root" as the user, it logged in successfully.  I then tried to login with the original key that I associated when setting up the instance and it worked with ec2-user.

Any ideas why this happened?

1 Answers

From your description it sounds like you added the public key under the root user’s authorized_keys instead of ec2-user’s. If you add the second public key to the location in ec2-users home folder (should be /home/ec2-user/.ssh/authorized_keys) it should work fine

Abe Butel

makes sense. thank you

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?