scp错误 WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

执行scp或ssh-copy-id -i 出现下面的错误

[jifeng@jifeng01 ~]$ ssh-copy-id -i ~/.ssh/id_rsa.pub jifeng@jifeng03
28
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
5f:20:1a:77:96:99:4a:f2:5d:a1:1d:68:b6:91:5a:e7.
Please contact your system administrator.
Add correct host key in /home/jifeng/.ssh/known_hosts to get rid of this message.
Offending key in /home/jifeng/.ssh/known_hosts:2
RSA host key for jifeng03 has changed and you have requested strict checking.
Host key verification failed.

由于jifeng03换了台新机器,导致的问题

修改.ssh下的known_hosts文件

[jifeng@jifeng01 ~]$ cd .ssh
[jifeng@jifeng01 .ssh]$ vi known_hosts 
把下面这段代码删除

jifeng03,10.3.7.178 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA7tNeVty1bbDiPlCNJoOAriFsa+OXh08mpRvItCoo6OmgbGfnXyOZMJJq5zOx3SKdhnGXzQ1UdCHVRz3zoQVwE6OaQc/xzJnkZ24T3wW6p1w68Y38M16S72UuEWHTA69imFAdq1EczgR14E6e3Sesr2Pnv9x0JRJMcYljbvP7o+TH4BjXoUqT/i4xsF0Nsu4Ki70J/2AwQHDFiKZhJSuMoWLMgyOZ7glAuqXWAQmJ/oYZRj16T7P7o4i+li8HY0wQYkW4Clwxqsszn7Gq1WhaarX8MFjPjxfxOQuf9YstY9FJDjhM3ziMA4/hClePKi6AlUxcnC9rpq8ocUUxQRlIlw==
重新执行就OK了


你可能感兴趣的:(ssh)