scp复制文件报错--It is also possible that a host key has just been changed.

340 阅读1分钟

使用scp在服务器之间传输文件,出现报错,这已经是第二次遇到这个问题了。 报错如下: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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:igzcN1Gh8smss4J+hYH/mBUO+3tiy9JxS20iSs1S89g. Please contact your system administrator. Add correct host key in /root/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /root/.ssh/known_hosts:1 ECDSA host key for 172.1.1.110 has changed and you have requested strict checking. Host key verification failed. lost connection ———————————————— 原文链接:blog.csdn.net/xzm5708796/…

出现错误的原因是:本地的known_hosts保存的主机hostkey记录改变了

执行以下代码可以解决问题 rm -rf ~/.ssh/known_hosts

注意:rm -rf命令一定要小心执行。 再使用scp命令传输文件,则没有问题啦。