Tabs

Sunday, June 21, 2020

Remote Host Identification Has Changed!

Today we look at how to fix the Remote Host Identification Has Changed! message when attempting to SSH.Recently I was attempting to SSH into my Raspberry Pi from my Macbook Pro and received a message I have not seen before:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:<Your SHA Value>.
Please contact your system administrator.
Add correct host key in /Users/"user"/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/"user"/.ssh/known_hosts:8
ECDSA host key for <IP of computer> has changed and you have requested strict checking.
Host key verification failed.
So I hit the internet and found that this can be easily resolved with a simply command in Terminal. If you type in the following command and click enter, a new kew will be generated for the computer's IP address you are attempting to SSH into.
$ ssh-keygen -R [hostname-or-IP]
Check out my video below to see exactly how to resolve this message!