CAUTION: Please test this on a test machine/VM before you actually do this on your slurm compute node.
Step 1. Make sure pam_listfile.so
exists on your system. The following command is an example on Redhat 6:
ls -la /lib64/security/pam_listfile.so
Step 2. Create user list (e.g. /etc/ssh/allowed_users):