前几天服务器出现故障,重新安装的系统。使用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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
c9:f8:de:4e:a1:2a:9e:26:**:**:**:**:**:**:**:**.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:4
RSA host key for 192.168.**.** has changed and you have requested strict checking.
Host key verification failed.
lost connection
------------------------------------------------------------------
解决方法:
vi 打开/root/.ssh/known_hosts
会找到曾经匹配使用SCP传送文件的key
然后选择删除对应的IP地址行,重新连接SCP就行了,又会提醒保存。
The authenticity of host '192.168**(********)' can't be established.
RSA key fingerprint is c9:f8:de:4e:a1:2a:9e:**************
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.**.**' (RSA) to the list of known hosts.
root@192.168.**.**'s password:
就OK了。