- 现象:重新安装的操作系统,使用scp拷贝文件时报如下错误:
- 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
- a7:a8:f2:97:94:33:58:b7:9d:bc:e0:a6:6b:f7:0a:29.
- Please contact your system administrator.
- Add correct host key in /home/ramesh/.ssh/known_hosts to get rid of this message.
- Offending key in /home/ramesh/.ssh/known_hosts: 6
原因:因为之前拷贝源上的known_hosts文件中已经存在了拷贝目标的IP地址及信息,而重新安装后,重新生成了公钥及私钥,所以导致此问题的产生。
解决方法,在known_hosts文件把目标主机的相关信息删除即可!