LFCA practice question 2 of 15

Which of the following is considered a best practice for hardening SSHD?

Full set: 60 questions

Domain Security Fundamentals

Answer options
A: Using portknocking to protect ssh access for root
B: Completely disabling ssh access
C: Disabling ssh access for root Correct answer
D: Renaming root to a random name
Correct Answer:
C. Disabling ssh access for root
Explanation

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.

Why Incorrect

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.

References

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."

Scroll to Top