To Fix "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" SSH Error
when you try to connect a server with ssh and you get this 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
SHA256:mCn3qP06gXNPyBWkvrfb7f4GjBSXYgeeG+sVJNY5xo4.
Please contact your system administrator.
Add correct host key in /Users/[your name]/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/[your name]/.ssh/known_hosts:2279
Host key for 192.168.1.100 has changed and you have requested strict checking.
Host key verification failed.
Because the host key has changed, it might be that the os of the server has been reinstalled.
you need to remove the old key from your known_hosts file.
if you want to connect it again, you can use the following command:
ssh-keygen -R 192.168.1.100
This command will remove the host key from your known_hosts file. you can see:
# Host 192.168.1.100 found: line 2278
# Host 192.168.1.100 found: line 2279
/Users/[your name]/.ssh/known_hosts updated.
Original contents retained as /Users/[your name]/.ssh/known_hosts.old
ok , try to connect again.