If unable to login via SSH, check the /etc/ssh/sshd_config for AllowGroups.

AllowGroups root groupname

It’s case sensitive.