Cannot log in with ec2-user

0

I just started an instance with AWS Redhat Linux 9 image. I selected the existing private key during installation. I cannot log in with ec2-user using the private key that I know it is correct. Will you help me resolve this issue?

putty login error

  • I spun up a REL 9 instance and was able to login via SSH as ec2-user. PuTTY v0.77.

asked a year ago191 views
2 Answers
0

Which version of Windows and PuTTY are you running? From your screenshot the Windows version looks quite old, so it's likely your problem is caused by a cipher mis-match.

RHEL9 has deprecated some old & insecure encryption algorithms, but when attempting the initial key exchange PuTTY is still likely offering up these.

You can prove the keys are good by spinning up an EC2 running RHEL6 or 7 and confirm that you can login with the key on these older versions of Linux.

Then you could use this new RHEL7 host as a sort of bastion to get yourself access to the RHEL9 host (though that costs money, so consider using Amazon Linux 2 which is cheaper), assuming you can't upgrade Windows/PuTTY to something that can get you connected directly.

You will likely find the same happens with EC2s running new versions like Amazon Linux 2023 and Fedora 37.

See https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/security_hardening/using-the-system-wide-cryptographic-policies_security-hardening for advice on downgrading the security of your RHEL9 instance.

profile picture
EXPERT
Steve_M
answered a year ago
0

Thank you. I was able to log in with ec2-user after upgrading my Putty on the client Windows machine.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions