Unable to do ssh from normal user due to the error " none of user's groups are listed in AllowGroups"

Solution Verified - Updated -

Issue

  • Unable to do ssh, since users are not the part of AllowGroups in ssh configuration file.
Dec 20 15:00:24 TESTLABMACHINE1 usermod[628119]: add 'user1' to group 'wheel'
Dec 20 15:00:24 TESTLABMACHINE1 usermod[628119]: add 'user1' to shadow group 'wheel'
Dec 20 15:00:40 TESTLABMACHINE1 usermod[628171]: add 'user2' to group 'wheel'
Dec 20 15:00:40 TESTLABMACHINE1 usermod[628171]: add 'user2' to shadow group 'wheel'
Dec 20 15:03:03 TESTLABMACHINE1 sshd[628621]: User user1 from 10.x.x.xxx not allowed because none of user's groups are listed in AllowGroups
Dec 20 15:03:09 TESTLABMACHINE1 sshd[628621]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.45.9.251  user=user1
Dec 20 15:03:11 TESTLABMACHINE1 sshd[628621]: Failed password for invalid user user1 from 10.x.x.x port 57474 ssh2
Dec 20 15:03:21 TESTLABMACHINE1 sshd[628621]: error: Received disconnect from 10.4 port 57474:13: Unable to authenticate [preauth]

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content