• SSH登录异常(someone is doing something nasty)


    在平时工作中,有时候需要SSH登陆到别的Linux主机上去,但有时候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 is36:68:a6:e6:43:34:6b:82:d7:f4:df:1f:c2:e7:37:cc.Please contact your system administrator.Add correct host key in /u/xlian008/.ssh/known_hosts to get rid of this message.Offending key in /u/xlian008/.ssh/known_hosts:2RSA host key for 135.1.35.130 has changed and you have requested strict checking.Host key verification failed.

    比较奇怪,于是研究了一下。

     ssh会把你每个你访问过计算机的公钥(public key)都记录在~/.ssh/known_hosts。当下次访问相同计算机时,OpenSSH会核对公钥。如果公钥不同,OpenSSH会发出警告, 避免你受到DNS Hijack之类的攻击。我在上面列出的情况,就是这种情况。

    原因:一台主机上有多个Linux系统,会经常切换,那么这些系统使用同一ip,登录过一次后就会把ssh信息记录在本地的~/.ssh/known_hsots文件中,切换该系统后再用ssh访问这台主机就会出现冲突警告,需要手动删除修改known_hsots里面的内容。

    直接删除本地的.ssh/known_hosts 文件就可以

  • 相关阅读:
    HTTPD之五---HTTP协议、相关工具及状态码
    HTTPD之四----实现HTTPD正向代理与反向代理
    第十三周---DNS原理、实现智能DNS及源码编译mariadb数据库
    DNS之五----实现智能DNS
    sqoop 导入增量数据到hive
    Hadoop 二次排序
    Spark foreachpartiton和mappartition的异同
    hadoop 实现多文件输出
    spark 实现多文件输出
    Scala 中 call by name & call by value 的区别
  • 原文地址:https://www.cnblogs.com/whlives/p/7641326.html
Copyright © 2020-2023  润新知