Mike Ramirez wrote:
The safest be for this is to make sure that any user in /etc/passwd and
/etc/shadow has there shell set to nologin that doesn't need SSH
What I do is only allow certain user names ssh access from outside. E.g. from /etc/ssh/sshd_config:
AllowUsers john skylar
This only allows my son and I to use ssh; everything else gets rejected with an "illegal user" error.
--
-John (john@xxxxxxxxxxx)