zoukankan      html  css  js  c++  java
  • JumpServer报“认证失败 Authentication Error”小案例分析

    在JumpServer里面跳转到一台MySQL服务器时,出现下面错误认证失败 Authentication Error

     

    Opt or ID>: 5
     
    Only match Host:  xxxx 
     
    Connecting xxxx ...
     
    认证失败 Authentication Error.

     

    首先检查JumpServer的日志 /opt/jumpserver/logs/jumpserver.log,发现下面一些日志信息

     

    2020-06-23 15:43:15,581 - connect.py - DEBUG - {'ip': u'192.168.xxx.xxx', 'role_name': u'xxxxx', 'role_key': u'/opt/jumpserver/keys/user/xxxxx_xxxxx.pem', 'user': <User: xxxxx>, 'role_pass': 'xxxxx', 'port': 22, 'asset': <Asset: 192.168.xxx.xxx>}
     
    2020-06-23 15:43:17,815 - connect.py - WARNING - 使用ssh key /opt/jumpserver/keys/user/xxxxx_xxxxx.pem 失败, 尝试只使用密码

     

    然后从控制台登录那台需要连接的服务器上,看到如下所示日志信息

     

    Jun 23 16:02:12 xxxxx sshd[24534]: User xxxxx from xxxxx not allowed because not listed in AllowUsers

    Jun 23 16:02:12 xxxxx sshd[24535]: input_userauth_request: invalid user xxxxx

    Jun 23 16:02:12 xxxxx sshd[24534]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=xxxxx  user=xxxxx

    Jun 23 16:02:14 xxxxx sshd[24534]: Failed password for invalid user xxxxx from xxxxx port 54441 ssh2

    Jun 23 16:02:14 xxxxx sshd[24536]: User xxxxx from xxxxx not allowed because not listed in AllowUsers

    Jun 23 16:02:14 xxxxx sshd[24537]: input_userauth_request: invalid user xxxxx

    Jun 23 16:02:14 xxxxx sshd[24536]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=xxxxx  user=xxxxx

    Jun 23 16:02:16 xxxxx sshd[24536]: Failed password for invalid user xxxxx from xxxxx port 54445 ssh2

    Jun 23 16:02:16 xxxxx sshd[24537]: Connection closed by xxxxx

    Jun 23 16:02:16 xxxxx sshd[24535]: Connection closed by xxxxx

     

    检查 /etc/ssh/sshd_config,发现JumpServer服务器的IP地址被注释了。应该是某个时候,粗心大意给释掉的。然后就出现了这一幕,从JumpServer跳转到这台服务器时报认证失败 Authentication Error

     

    #AllowUsers *@192.168.xxx.xxx

     

    解决方法取消JumpServer主机的注释重启sshd服务。问题解决。

     

  • 相关阅读:
    L2-011 玩转二叉树 二叉树
    L2-010 排座位 并查集
    L2-009 抢红包
    VS 编译报错:意外的字符
    关于js的类型转换
    github相关操作总结
    关于时间的相关处理
    uniapp实现简单的动画效果(不使用dom操作)
    uniapp选择日期
    vue使用音频组件
  • 原文地址:https://www.cnblogs.com/kerrycode/p/13182923.html
Copyright © 2011-2022 走看看