zoukankan      html  css  js  c++  java
  • ssh无法登录linux服务器的解决办法

    最近之前使用的一台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 a host key has just been changed.
    The fingerprint for the RSA key sent by the remote host is
    SHA256:az7FfVtBpsebsnnIN5nAyqBzE3oEmTYcTd/bJu+yp38.
    Please contact your system administrator.
    Add correct host key in /home/kaixi_fan/.ssh/known_hosts to get rid of this message.
    Offending RSA key in /home/kaixi_fan/.ssh/known_hosts:2
    RSA host key for 172.29.38.37 has changed and you have requested strict checking.
    Host key verification failed.

    看起来是ssh key我本地终端和服务器保存的,2者对不上了,这时候可以这么办:
    删除提示信息中,对应的行数,例如上例,需要删除 /home/kaixi_fan/.ssh/known_hosts文件的第2行。

    然后重新登录,会给出如下提示:

    The authenticity of host '172.29.38.37 (172.29.38.37)' can't be established.
    ECDSA key fingerprint is xxxxxxxxxxxxxxxxxxxxxxxxxx(此处是key)
    Are you sure you want to continue connecting (yes/no)? yes(输入yes)
    Warning: Permanently added '172.29.38.37' (ECDSA) to the list of known hosts.

    重新输入yes就好啦。

  • 相关阅读:
    使用git笔记
    linux 进程管理的一些命令使用
    [zz]XML DOM 教程
    [zz]std::string 和 c 的字符串
    [zz]grep 命令的使用
    [zz]XercesC++ 参考
    [zz]Windows WordPress本地安装教程
    今天调出来的关于cello的bug
    shell 编程的一些问题
    关于java中边界值校验的问题
  • 原文地址:https://www.cnblogs.com/ironx/p/5238820.html
Copyright © 2011-2022 走看看