0

I can SSH in fine with my .pem file, to be automatically logged in as ec2-user.

I can create a new user and password fine, and login with su - testUser.

How do I log back into ec2-user without exiting the SSH session and re-connecting with the .pem file?

I've tried su - and su - ec2-user, both of which prompt for passwords.

Entering no password gives su: Authentication failure.

As far as I'm aware, there is no default password.

Or is it simply intended for one to set a password for ec2-user?

0

Just discovered all I had to do was type exit to be logged out of testUser, back to ec2-user.

Then typing in exit again logs out of the SSH session.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.