Remove Bad Keys From ~/.ssh/known_hosts
Sample
1icasimpan-local:~ icasimpan$ ssh root@99.206.157.36
2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
3@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
4@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
5IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
6Someone could be eavesdropping on you right now (man-in-the-middle attack)!
7It is also possible that a host key has just been changed.
8The fingerprint for the ECDSA key sent by the remote host is
9SHA256:AbJnvQd/cMEDiN0ohMp6gdmBYRhRRp6h8iOBJf0m4Zs.
10Please contact your system administrator.
11Add correct host key in /Users/icasimpan/.ssh/known_hosts to get rid of this message.
12Offending ECDSA key in /Users/icasimpan/.ssh/known_hosts:403
13ECDSA host key for 99.206.157.36 has changed and you have requested strict checking.
14Host key verification failed.
Do it this way:
1icasimpan-local:~ icasimpan$ ssh-keygen -f "/Users/icasimpan/.ssh/known_hosts" -R 99.206.157.36
2# Host 99.206.157.36 found: line 403
3/Users/icasimpan/.ssh/known_hosts updated
4Original contents retained as /Users/icasimpan/.ssh/known_hosts.old