SSH restrict access to user or group

When you have a public Linux server with Open SSH installed you will often find in you security logs failed login attempts from deferent ip’s most of them are hackers trying to brute force user accounts, one of security measures that can be added to Open SSH server is to restrict access to a specific user or specific group for example to allow user roger only to login to ssh you add the following line to /etc/ssh/sshd_config

AllowUsers roger

to restrict access to admin group add the following line

AllowGroups admin