2.11.1.1.3. REMOTE HOST IDENTIFICATION HAS CHANGED
When connecting to a server via SSH, you may encounter the error "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!":
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 RSA key sent by the remote host is
SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
Please contact your system administrator.
Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/user/.ssh/known_hosts:3
RSA host key for example.ftp.tools has changed and you have requested strict checking.
Host key verification failed.
This error occurs due to a change in the server certificate. Before resolving the error, it is advisable to ensure that there is no unauthorized access to your network and that there is no relay on the route to the target address, as this is how a MITM (Man In The Middle) attack is conducted. Additionally, the error may occur when a hosting account is transferred between our servers (for example, during migration or for technical reasons). In such cases, the error will most often be accompanied by the error "WARNING: POSSIBLE DNS SPOOFING DETECTED!".
To resolve the error, you need to delete the existing key for the address using one of the following methods:
- Execute the command:
ssh-keygen -R example.ftp.toolsReplace
example.ftp.toolswith the address you are connecting to. - Delete the key in the
known_hostsfile on your device (the file path usually looks like/home/user/.ssh/known_hosts). The file contains entries approximately like this:
In this example, you need to delete all text from example.ftp.toolstoxxxxxxx.ftp.tools: