How to fix Remote Host Identification Has Changed error in SSH
SSH by default will check and keep key fingerprint of all the hosts you’ve connected to in ~/.ssh/known_hosts
. You’ll get the following warning if the fingerprint changed from the last time you’ve connected to the host;
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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 the RSA host key has just been changed. The fingerprint for the RSA key sent by the remote host is 11:5b:16:56:a5:cd:9b:1e:11:aa:2b:1c:a2:91:cd:a2. Please contact your system administrator. Add correct host key in /home/user/.ssh/known_hosts to get rid of this message. Offending key in /home/user/.ssh/known_hosts:1 RSA host key for docs.oseems.com has changed and you have requested strict checking. Host key verification failed.
You can fix the problem by whether disabling the key check, or have the right key in your ~/.ssh/known_hosts
file.
The check is done for security reason. Proceed only if you know exactly what you’re into.