Amazon EC2 password prompt when "su - ec2-user"

0

1

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?

Leo

Posted 2015-09-28T13:17:31.070

Reputation: 229

Answers

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.

Leo

Posted 2015-09-28T13:17:31.070

Reputation: 229