Hi,
I keep getting this error after creating my EC2 instance and control it using ssh key pair for a while. This has happened 2 times. Last time I had to create a new instance and mount it to the existing EBS volume to recover the data.
Command to ssh using Windows Terminal:
ssh -i "C:\Users\Dell\.ssh\my-key-name.pem" ec2-user@myserver.com
Got:
Please login as the user "ec2-user" rather than the user "root".
Connection to myserver.com closed.
I can still ssh using EC2 Instance Connect.
Thanks for helping out.