scp传输报错解决

1.在ip为172.16.26.1的主机使用scp传输数据时发生下面的报错 (警告:远程主机标识已经更改!

[root@localhost /]# scp linux.txt 172.16.26.2:/

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
5b:4e:bf:fa:a0:98:c2:a6:96:ab:1e:d2:3d:3e:59:b6.
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:2
RSA host key for 172.16.26.2 has changed and you have requested strict checking.
Host key verification failed.

lost connection

2.ssh了一下试试 发现了同样的报错

[root@localhost /]# ssh 172.16.26.2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
5b:4e:bf:fa:a0:98:c2:a6:96:ab:1e:d2:3d:3e:59:b6.
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:2
RSA host key for 172.16.26.2 has changed and you have requested strict checking.
Host key verification failed.

3.用172.16.26.2这台主机 scp时是正常的没有出现错误,一定是172.16.26.1上出现了问题

4.查看了一下家目录下的.ssh/known_hosts
删除.ssh/known_hosts 中关于远程主机的那部分
重新ssh 远程主机ip   
连接成功

可能的原因是在以前曾有172.16.26.2的其他主机ssh过,所以导致远程主机标识不同了,才报的错

不知理解的是否正确,请多多指教

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值