美文网首页
解决Host key verification failed.

解决Host key verification failed.

作者: 只是个少年 | 来源:发表于2019-04-26 10:50 被阅读0次
    一、发现问题
    $ ssh root@108.61.163.242
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @    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
    SHA256:HDjXJvu0VYXWF+SKMZjSGn4FQmg/+w6eV9ljJvIXpx0.
    Please contact your system administrator.
    Add correct host key in /Users/wangdong/.ssh/known_hosts to get rid of this message.
    Offending ECDSA key in /Users/wangdong/.ssh/known_hosts:46
    ECDSA host key for 108.61.163.242 has changed and you have requested strict checking.
    Host key verification failed.
    

    这里面,有一句很关键。

    ECDSA host key for 108.61.163.242 has changed and you have requested strict checking.
    Host key verification failed.
    

    一般这个问题,是你重置过你的服务器后。你再次想访问会出现这个问题。

    二、解决问题

    解决问题也很简单:

    ssh-keygen -R 你要访问的IP地址
    
    最后贴一张效果图。上文是别人的记录。最后的图是自己的实验效果。亲测可用
    ssh-keygen -R 108.61.163.242
    
    image.png

    相关文章

      网友评论

          本文标题:解决Host key verification failed.

          本文链接:https://www.haomeiwen.com/subject/pxcfnqtx.html