错误信息
在192.168.1.119服务器上拉取192.168.1.10上面的信息内容出现以下错误
[root@jsiuZ ~]# scp root@192.168.1.10:/mnt/bak/test.tar /mnt/bak/test.tar
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
07:71:36:99:f8:f7:e8:bc:27:60:96.
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:3
RSA host key for 192.168.1.10 has changed and you have requested strict checking.
Host key verification failed.
网上也有很多类拟问题,原因第一次使用SSH连接时,会生成一个认证,储存在客户端的known_hosts中.或者链接服务器修改了口令,当前情况应该属于后者。
查看客户机认证信息
[root@jsiuZ ~]# cat ~/.ssh/known_hosts
192.168.1.10 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAptYRxw5rkpuRX0Fnl2RF+HrtGFWiPB7PR9riHT9c1VYd9dUeiUo3842sLnn3PO1SG0xgIRcR+f1iLFUYGLumML//s/wiVRtvgszRrep6JCBUuOMfT8yE7qWy51pEDfQHvkN1es8HKBCNPdbnkiaejmpxEdkI+H9/RTHhvMOTUPTutJGpdee6oA6dNh5uGiun1iTAK7rOQ0Cd7tPY7DUK9LnDgkxX1gb0g7u5aCMGq1eTTNLl7xEA0Iqroz4yB3HFO+ZwrYgbx/TPdDpsZ+iEjOeRbkGm43DDjN4oVq99TUmCZxVOzJUGpb5Awdre94M9s2uwQ==
解决方法
ssh-keygen -R 服务器IP
[root@jsiuZ ~]# ssh-keygen -R 192.168.1.10
/root/.ssh/known_hosts updated.
Original contents retained as /root/.ssh/known_hosts.old
重新链接
[root@jsiuZ ~]# scp root@192.168.1.10:/mnt/bak/test.tar /mnt/bak/test.tar
The authenticity of host '192.168.1.10 (192.168.1.10)' can't be established.
RSA key fingerprint is 07:71:36:99:f8:60:96:f5:27:a2.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.10' (RSA) to the list of known hosts.
root@192.168.1.10's password: