You have large number of user accounts on the systems, then it makes sense that we limit remote access to those users who really need it.
Open the config file
# vim /etc/ssh/sshd_config
and Add an AllowUsers line at the bottom of the file with a space separated by list of usernames.
AllowUsers jeffin ctechz
Restart ssh service # service sshd restart
Note: If you are not able to login into the shell using root account after changing PermitRootLogin to YES, check AllowUsers either remove the line or add root also here.
Open the config file
# vim /etc/ssh/sshd_config
and Add an AllowUsers line at the bottom of the file with a space separated by list of usernames.
AllowUsers jeffin ctechz
Restart ssh service # service sshd restart
Note: If you are not able to login into the shell using root account after changing PermitRootLogin to YES, check AllowUsers either remove the line or add root also here.
Terima kasih telah membaca artikel tentang How to Limit SSH User Logins in linux di blog Tutorial Opensource and Linux jika anda ingin menyebar luaskan artikel ini di mohon untuk mencantumkan link sebagai Sumbernya, dan bila artikel ini bermanfaat silakan bookmark halaman ini di web browser anda, dengan cara menekan Ctrl + D pada tombol keyboard anda.