SSH登陆错误"WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! "

SSH登陆错误解决办法:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
21:24:59:ba:53:d7:51:a2:12:13:40:09:53:03:5b:e6.
Please contact your system administrator.
Add correct host key in /home/cmccpay/.ssh/known_hosts to get rid of this message.
Offending key in /home/cmccpay/.ssh/known_hosts:11
RSA host key for 10.202.76.27 has changed and you have requested strict checking.
Host key verification failed.

出现该错误的解决方法:

  1. 因为在本地机器上曾经用SSH登录过这台远程计算机,因而留下了known_hosts的记录,在远程计算机重新安装系统后不能够通过鉴权。删除~/.ssh/known_hosts中对应的项目,问题获得解决。(很麻烦。。忽视之)
  2. 在客户端执行下述指令即可:$mv ~/.ssh/known_hosts /tmp (相对好一点,用过)
    再次登录后会出现最初需要增加条目:
    The authenticity of host '128.112.139.3 (128.112.139.3)' can't be established.
    RSA key fingerprint is ce:78:c2:d5:26:11:42:cf:c6:e6:65:99::60:51:34.
    Are you sure you want to continue connecting (yes/no)? The authenticity of host '132.170.3.32 (132.170.3.32)' can't be established.
    RSA key fingerprint is 91:14::ea:e7:43:5d:8b:57:aa:51:57:e0:28:06:52.
    Are you sure you want to continue connecting (yes/no)? yes
  3. 配置文件进行配置,使出现“Warning: Host identification has changed!”时候可以自动更新~/.ssh/known_hosts中的相应条目,而不出现提示。(比较好!方便,无需后期处理)
    OpenSSH 有三种配置方式:命令行参数、用户配置文件和系统级的配置文件("/etc/ssh/ssh_config")。命令行参数优先于配置文件,用户配置文件优先于系统配置文件。所有的命令行的参数都能在配置文件中设置。因为在安装的时候没有默认的用户配置文件,所以要把"/etc/ssh /ssh_config"拷贝并重新命名为"~/.ssh/config"。
    (下一篇中具体介绍ssh的配置文件)
    注意在配置文件~/.ssh/config中修改下面的内容:
    Host *
    GSSAPIAuthentication yes
    BatchMode yes
    StrictHostKeyChecking no

 

 

 

引用自http://rttech.spaces.live.com/blog/cns!1D57B9457EA24D18!183.entry

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值