scp在Centos上使用出现WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

错误信息

在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: 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值