Why
To make it easy to control who can SSH to the server. By using a group, we can quickly add/remove accounts to the group to quickly allow or not allow SSH access to the server.How It Works
We will use theAllowGroups option in SSH’s configuration file /etc/ssh/sshd_config to tell the SSH server to only allow users to SSH in if they are a member of a certain UNIX group. Anyone not in the group will not be able to SSH in.
Goals
- A UNIX group that we’ll use in the SSH configuration to limit who can SSH to the server
This is a prerequisite step to support the
AllowGroups setting that will be configured in Secure /etc/ssh/sshd_config.Steps
What’s Next?
After creating the group and adding users, you’ll configure the SSH server to use this group in Secure/etc/ssh/sshd_config.
References
man groupaddman usermodman getent