ssh错误:REMOTE HOST IDENTIFICATION HAS CHANGED

小白今天用ssh命令进行远程服务器跳转的时候,出现了一个报错:

linux101:/home/wsj # ssh oracle@10.141.52.101


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
06:7f:ff:b6:3d:c1:c3:2d:0a:19:15:9f:f0:08:0c:89.
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:41
RSA host key for 10.141.52.101 has changed and you have requested strict checking.
Host key verification failed.

 

进入linux101服务器查看文件/root/.ssh/known_hosts有这么一行:

10.141.52.101 ssh-rsa AARX3NzaC1yc2EAAAABIwAAAIEA5sBzOOAG6O7TVoQxDjk3AANDVMuNPkrOJWarZuP9kMfcA1u3gmt5yoMJc7M4j0rf+ff9s+090Y3WZ7RGdQQ8FAqGc2O0zXLNUeVv9atczzJEd3RAzHtcGgZlsG3AXv5ULp3mzSp3RqxqSC0tKH+K2VxJYBy73zn5vXYfJRjC00=

将这一行删除,再执行

linux101:/home/wsj # ssh oracle@10.141.52.101
The authenticity of host '10.141.52.101 (10.141.52.101)' can't be established.
RSA key fingerprint is 06:3d:c1:197f:ff:2d:0a::f0:08:0c:89b6::15:9fc3:.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.141.52.101' (RSA) to the list of known hosts.
Authorized users only. All activity may be monitored and reported.
Last login: Tue Dec 10 22:41:06 2013 from 10.141.24.78
Authorized users only. All activity may be monitored and reported.

 

问题追踪:在ssh命令使用过程中,会去~/.ssh/known_hosts中去进行密码鉴权.一般情况下,一个IP对应的鉴权密钥是不会发生变化的,除非

1.  人为改动(可能性较小)

2.  系统被部分重装过(比如重装数据库)

3. 此IP为双机或者集群中的浮动IP,在业务运行中,若发生切换,浮动IP绑定的固定IP发生变化,就会引起ssh命令执行的失败


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值