• 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服务。问题解决。

     

  • 相关阅读:
    window.location.Reload()和window.location.href 区别
    PHP substr(),mb_substr()及mb_strcut的区别和用法
    jstree节点展开设置
    关于Jquery中ajax方法data参数用法
    HTML相对路径(Relative Path)和绝对路径(Absolute Path)
    Win32基础编程了解窗口类
    Visual C++ ActiveX 开发指南:第一章 什么是ActiveX
    分粥
    蛙蛙推荐:ASP实现自定义标签模板
    蛙蛙请教:如何利用委托实现多个方法同时调用.
  • 原文地址:https://www.cnblogs.com/kerrycode/p/13182923.html
Copyright © 2020-2023  润新知