3.6.1.14 OpenSSH: Regulate access to server

Information

There are several options available to regulate access to a server via OpenSSH. At least of the following options needs to be leveraged:

AllowUsers: The AllowUsers variable specifies which users may ssh into the system. The list is user names separated by spaces. Numeric userIDs are not recognized with this variable. Access can be narrowed to restrict user access from a specific host using the form user@host.

AllowGroups: The AllowGroups variable specifies groups of users who are permitted to ssh into the system. The list is group names separated by spaces. Numeric groupIDs are not recognized with this variable.

DenyUsers: The DenyUsers variable specifies specific users who may not ssh into the system. The list is user names separated by spaces. Numeric userIDs are not recognized with this variable. Access can be narrowed to restrict user access from a specific host using the form user@host.

DenyGroups: The DenyGroups variable specifies groups of users who are not permitted to ssh into the system. The list is group names separated by spaces. Numeric groupIDs are not recognized with this variable.

Rationale:

Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system.

Solution

Edit the /etc/ssh/sshd_config file to set one (or more) of the following parameters:

AllowUsers <userlist>
AllowGroups <grouplist>
DenyUsers <userlist>
DenyGroups <grouplist>

Re-cycle the sshd daemon to pick up the configuration changes:

stopsrc -s sshd
startsrc -s sshd

Default Value:

All users from any host are permitted.

See Also

https://workbench.cisecurity.org/files/4119

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6, 800-53|CM-7, CSCv7|9.2

Plugin: Unix

Control ID: f6590469e18d87cdd324356b3e357ca12d2942a180d87ad04917e456eca1e6cd