|
Hosts: if you're using an sshd that has been compiled with libwrap support (TCP wrappers) you can add addressess or ranges to allow/deny in /etc/hosts.{deny,allow}. Unfortunately the new sshd conf's don't allow specifying ranges in the config file itself anymore.
You can also add ranges/hosts to your firewall script to allow/deny access from/to.
Users: in sshd_config you can add directives format {Allow,Deny}{Groups,Users}.
If you've got a PAM enabled distro you can also add the next line in /etc/pam.d/sshd under the last "auth" statement:
"auth required /lib/security/pam_listfile.so item=user sense=allow file=/etc/pam.allow.sshd onerr=fail"
edit the file /etc/pam.allow.sshd and add all user you want to grant ssh access to.
On a side note, please try searching the forum first, try to make clear what you've tried to do to make it work, or if it's about errors, please always post them.
HTH
|