Linux_SSH Warning: the RSA host key for differs from the key for the IP address

原文地址: http://blog.csdn.net/zhangp80/article/details/6889568
 
[hudson@sjbude183v .ssh]$ ssh soa@sjisbe381 ls /tmp
The authenticity of host 'sjisbe381 (10.100.87.11)' can't be established.
RSA key fingerprint is 8f:bd:9b:06:92:1d:0b:6e:0e:d0:f3:d1:cd:f7:f7:6e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'sjisbe381' (RSA) to the list of known hosts.
Warning: the RSA host key for 'sjisbe381' differs from the key for the IP address '10.100.87.11'
Offending key for IP in /builds/hudson/.ssh/known_hosts:36
Are you sure you want to continue connecting (yes/no)? 

当ssh访问一台server时,如果出现“Warning: the RSA host key for differs from the key for the IP address”这样的信息,表示在known_hosts里已经有一台server和你正要访问的server的IP冲突。

另外一条类似于这样的信息“Offending key for IP in /builds/hudson/.ssh/known_hosts:36″,表示IP冲突位于known_hosts的第36行, 只要打开~/.ssh/known_hosts,删除第36行就可以将问题解决,或者直接运行一条命令搞定“sed -i -e ’36d’ ~/.ssh/known_hosts”。

如果你想彻底摆脱known_hosts,将“StrictHostKeyChecking no”添加到~/.ssh/config,这样以后访问新的server都不在有known_hosts的提示。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值