zoukankan      html  css  js  c++  java
  • SSH远程主机秘钥失效的解决方法

    一、问题描述:

    远程主机的SSH秘钥发生了变化,在使用SSH远程登录的时候,提示如下

    [root@localhost ~]# ssh root@172.16.48.10
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @    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 172.16.48.10 has changed and you have requested strict checking.
    Host key verification failed.

    提示中红色部分是问题关键,意思就是秘钥发生了变化,但是你的本机保存的是原来的秘钥

    二、解决问题

      ssh-keygen -R IP(远程的IP地址)

    [root@localhost ~]# ssh-keygen -R 172.16.48.10
    /root/.ssh/known_hosts updated.
    Original contents retained as /root/.ssh/known_hosts.old

    出现红色部分提示表示成功,然后重新使用SSH远程登录即可

    [root@localhost ~]# ssh admin@172.16.48.10
    
    welcome
    
    admin@172.16.48.10's password: 
    
    ******************************************************************************
    * Copyright (c) 2004-2015 Hangzhou H3C Tech. Co., Ltd. All rights reserved.  *
    * Without the owner's prior written consent,                                 *
    * no decompiling or reverse-engineering shall be allowed.                    *
    ******************************************************************************
    
    <testS5820V2-10>

     

  • 相关阅读:
    滤波和减采样的互换
    LwIP情景示例
    [redis] redis 对string类型数据操作
    [ExtJs] ExtJs4.2 数据模型Ext.data.Model学习
    [生活] 90年前后出生的人现状如何?
    【java】java内存模型(2)--volatile内存语义详解
    【java】java内存模型 (1)--基础
    [extjs] ExtJS 4.2 开发环境搭建
    强烈推荐:240多个jQuery插件
    使用CXF为webservice添加拦截器
  • 原文地址:https://www.cnblogs.com/yizhipanghu/p/11136504.html
Copyright © 2011-2022 走看看