SSH Login Failed After Adding "AllowUsers" and "AllowGroups" Directives into /etc/ssh/sshd_config
Applies To:
Oracle Cloud Infrastructure - Version N/A and later
Linux OS - Version Oracle Linux 6.0 and later
Linux x86-64
Symptoms:
SSH client like PuTTY can return a failure like this:
disconnected: no supported authentication methods available (server sent: publickey, gssapi-with-mic)
Changes:
Added "AllowUsers
" and "AllowGroups
" directives into /etc/ssh/sshd_config
.
Cause:
When adding "AllowUsers
" and "AllowGroups
", the target user must fulfill both directives, by its user name matching one of the patterns in the AllowUsers
list AND by belonging to a group matching one of the patterns in the AllowGroups
list.
SSHD_CONFIG(5)
states:
The allow/deny directives are processed in the following order: DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups. All of the specified user and group tests must succeed, before user is allowed to log in.
Tagged:
0