This can be done in two ways, not sure whether it's possible in another ways. Here are the two possible ways.
1. Configuring /etc/ssh/sshd_config file
AllowUsers root - which will allow only root user to login through ssh
2. Using PAM.
Add "Account pam_access.so" to /etc/pam.d/sshd
Adding the above the line make login process to check /etc/security/access.conf for access
-:ALL EXCEPT root:ALL
1. Configuring /etc/ssh/sshd_config file
AllowUsers root - which will allow only root user to login through ssh
2. Using PAM.
Add "Account pam_access.so" to /etc/pam.d/sshd
Adding the above the line make login process to check /etc/security/access.conf for access
-:ALL EXCEPT root:ALL
No comments:
Post a Comment