LFCA practice question 2 of 15
Which of the following is considered a best practice for hardening SSHD?
Full set: 60 questionsDomain Security Fundamentals
Disabling direct root login via SSH (PermitRootLogin no) is a universally recommended security best practice. It significantly reduces the attack surface by preventing brute-force attacks against the well-known 'root' user account. This configuration forces all administrators to first authenticate as a non-privileged user and then elevate their privileges using sudo or su. This two-step process improves system security and provides a clearer audit trail, as actions are logged against a specific user's account before privilege escalation, enhancing accountability.
A. Port knocking is a security-through-obscurity method, not a standard best practice, and enabling any form of direct root access is discouraged.
B. Completely disabling SSH is not a hardening technique; it is the removal of a core remote administration service, which is often not a viable option.
D. Renaming the root user is a non-standard, complex, and potentially system-breaking action that is not considered a recommended security practice.
1. Red Hat Enterprise Linux 8 Documentation, "Securing networks," Chapter 3. "Securing access to the command line," Section 3.1.2. "Disabling root login over SSH." The guide explicitly states, "To reduce the risk of security breaches through privileged user accounts, configure your system to prevent root login over SSH." It details setting PermitRootLogin no in /etc/ssh/sshdconfig.
2. Ubuntu Server Guide (22.04 LTS), "Services," "OpenSSH Server." In the "Hardening" section, the documentation advises: "It is recommended to disable root login by editing /etc/ssh/sshdconfig and changing PermitRootLogin to no."
3. Carnegie Mellon University, Information Security Office, "Secure Your Server: SSH," Section "Secure SSH Configuration." This guide lists "Disable root logins" as a primary recommendation for securing an SSH server, stating it "prevents attackers from directly accessing the most privileged account on the system."
Keep practicing
Take the free LFCA practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other LFCA practice questions
- Question 1Which measures can be taken to prevent unauthorized access to cloud instances and service…
- Question 3An IT team needs to synchronize large amounts of data between two nodes on the company’s …
- Question 4Which of the following commands can be used to lock a user’s account so that they cannot …
- Question 5Which of the following best describes serverless computing?
- Question 6A server on the network is unreachable. What is the best method to verify connectivity be…
- Question 7Which of these providers host repositories of container images?
