XK0-005 · Question #1529
XK0-005 Question #1529: Real Exam Question with Answer & Explanation
The correct answer is B: Set PermitRootLogin to no in the /etc/ssh/sshd_config file.. The administrator should set PermitRootLogin to no in the /etc/ssh/sshd_config file to remove the possibility of remote administrative login via the SSH service. The PermitRootLogin directive controls whether the root user can log in using SSH. Setting it to no will deny any remo
Question
To harden one of the servers, an administrator needs to remove the possibility of remote administrative login via the SSH service. Which of the following should the administrator do?
Options
- AAdd the line DenyUsers root to the /etc/hosts.deny file.
- BSet PermitRootLogin to no in the /etc/ssh/sshd_config file.
- CAdd the line account required pam_nologin. so to the /etc/pam.d/sshd file.
- DSet PubKeyAuthentication to no in the /etc/ssh/ssh_config file.
Explanation
The administrator should set PermitRootLogin to no in the /etc/ssh/sshd_config file to remove the possibility of remote administrative login via the SSH service. The PermitRootLogin directive controls whether the root user can log in using SSH. Setting it to no will deny any remote login attempts by the root user. This will harden the server and prevent unauthorized access. The administrator should also restart the sshd service after making the change.
Topics
Community Discussion
No community discussion yet for this question.