• Linux:SSH错误"WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! "


    hadoop@master:~$ scp /home/hadoop/.ssh/authorized_keys node3:/home/hadoop/.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 a host key has just been changed.
    The fingerprint for the ECDSA key sent by the remote host is
    a8:68:2e:0e:1e:67:33:db:0f:f8:d0:0b:43:fe:17:e2.
    Please contact your system administrator.
    Add correct host key in /home/hadoop/.ssh/known_hosts to get rid of this message.
    Offending ECDSA key in /home/hadoop/.ssh/known_hosts:6
      remove with: ssh-keygen -f "/home/hadoop/.ssh/known_hosts" -R node3
    ECDSA host key for node3 has changed and you have requested strict checking.
    Host key verification failed.
    lost connection

    出现错误原因:

    之前使用ssh登录过该机器,在~/.ssh/known_host中记录了该信息。

    解决方案:删除known_host文件中的内容。

    hadoop@master:~$ cd .ssh
    hadoop@master:~/.ssh$ ls
    authorized_keys  id_rsa  id_rsa.pub  known_hosts
    hadoop@master:~/.ssh$ sudo vim known_hosts
    [sudo] password for hadoop:
    hadoop@master:~/.ssh$ scp authorized_keys node1:/home/hadoop/.ssh/
    authorized_keys                                                                                                                                             100%  395     0.4KB/s   00:00
    hadoop@master:~/.ssh$ scp authorized_keys node2:/home/hadoop/.ssh/
    authorized_keys                                                                                                                                             100%  395     0.4KB/s   00:00
    hadoop@master:~/.ssh$ scp authorized_keys node3:/home/hadoop/.ssh/
    hadoop@node3's password:
    authorized_keys                                                                                                                                             100%  395     0.4KB/s   00:00
    hadoop@master:~/.ssh$

    参考:http://www.cnblogs.com/york-hust/archive/2012/03/27/2420168.html

  • 相关阅读:
    MyBatis总结六:resultMap详解(包含多表查询)
    MyBatis总结五:#{}和${}的用法和区别
    MyBatis总结四:配置文件xml详解
    MyBatis使用动态代理报 invalid bound statement (not found) 错
    MyBatis总结三:使用动态代理实现dao接口
    MyBatis总结二:增删改查
    session详解&和cookie的区别
    cookie详解
    C#属性器Get和Set
    ORM实例介绍
  • 原文地址:https://www.cnblogs.com/yy3b2007com/p/5880198.html
Copyright © 2020-2023  润新知