This page describes the steps to allow or deny users for SSH.
Allow or deny SSH Users (Through Pam Authentication)
*vi /etc/pam.d/sshd
Insert the following line (for allow list)
auth required pam_listfile.so item=user sense=allow file=/etc/ssh/sshd.allow
Insert the following line (for Deny list)
auth required pam_listfile.so item=user sense=deny file=/etc/ssh/sshd.deny
*Create the file name "sshd.allow" & "sshd.deny" under /etc/ssh/
*Type the list of users name in the "sshd.allow" or "sshd.deny" file as per requirement.
No need to relaod any service, while authentication pam will read that line & call for the /etc/ ssh/sshd.allow or sshd.deny file & as per the user listed it will allow & deny only to ssh for the system.