I just started using amazon EC2 and I use it via cygwin on windows to run ubuntu. I recently tried logging in to my EC2 instance by ssh and I got this error message
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is...
Host key verification failed.
What is this, and how I do I get around this?
This means the SSH server is presenting a different RSA key than when you first connected to the server on this IP address. If you changed the instance running on this IP address/hostname, this should be expected.
If this is a completely unexpected error message, this is for your own protection. There's a chance someone could be doing something malicious and monitoring the connection.
If you want to override it, go to C:\Users\[your username]\.ssh\known_hosts
and remove the offending line that starts with the hostname and/or IP address of the SSH server. Then reconnect to the server.
just use
ssh-keygen -R hostname
example ssh-keygen -R 168.9.9.2
This will update the offending of your host from the known_hosts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With