Dave's Brain

Browse - Computer Tips - What should I do about: "REMOTE HOST IDENTIFICATION CHANGED!" from ssh family of commands?

Date: 2016dec15
OS: Linux
Product: ssh, scp, sftp, openssh-clients

Q.  What should I do about: "REMOTE HOST IDENTIFICATION CHANGED!" from ssh family of commands?

A.  The message looks like:

scp file1 the-remote-host:/path
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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 NN:NN:NN:NN:NN:NN:NN:NN:NN:NN:NN:NN:NN:NN:NN:NN. Please contact your system administrator. Add correct host key in /jsmith/.ssh/known_hosts to get rid of this message. Offending key in /jsmith/.ssh/known_hosts:2 RSA host key for [the-remote-host]:22 has changed and you have requested strict checking. Host key verification failed. lost connection
How you deal with this message depends on what you know. For example today I got this message because I updated the SSL key for the remote system. Since I know I did that, I know thee is no attack. So I edited ~/.ssh/known_hosts and deleted the line for the remote system and re-did the scp command. This time it worked.

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.