Loading...

Offending ECDSA key Add correct host key in known_hosts

Last updated: Dec 20th 2024

If you ever receive a response when you try to connect to the SSH server after updating your ssh key, all you have to do is locate the .known_hosts file and delete the existing key and retrigger the ssh command.  IF you have set up everything correctly it should open up.  

ssh -i "id_rsa" user@ec2.IP.eu-west-2.compute.amazonaws.com
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
SHA256:sfgsfdgsfsdfsdfqJdvw.
Please contact your system administrator.
Add correct host key in /c/Users/username/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /c/Users/username/.ssh/known_hosts:1
ECDSA host key for ec2-ip.eu-west-2.compute.amazonaws.com has changed and you have requested strict checking.     
Host key verification failed.

SYED ABDUL QUADER Published on 07 Jan 2021
Edit
Comments
Guest User