How To Fix the “Warning: Remote Host Identification Has Changed” Error

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 ED25519 key sent by the remote host is
xx.xx.xx.
Please contact your system administrator.
Add correct host key in /Users/johndeo/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/johndeo/.ssh/known_hosts:14
Host key for user has changed and you have requested strict checking.
Host key verification failed.

How To Fix the “Warning: Remote Host Identification Has Changed” Error (on Windows and Mac)

rom here, run the nano ~/.ssh/known_hosts command in your window. This will open a new Nano instance and display the keys within your known_hosts file:

You should delete the key causing the “Warning: Remote host identification has changed” error, then save your changes.

You might also want to delete the entire known_hosts file, especially if you only use SSH for one or two sites. To do this, you can run rm .ssh/known_hosts in a Terminal window.