From Notes Wiki
Restricting SSH access to given users
Sometimes on lab machines or machines which are part of AD/LDAP domain, it may be desired to allow SSH access only for few users. To achieve that use following steps:
- Edit /etc/ssh/sshd_config as follows:
- Append 'AllowUsers <usernames>'
- Use 'service sshd restart'
Similarly to allow everyone except a few users 'DenyUsers' can be used.