LFCA · Question #58
Which of the following is considered a best practice for hardening SSHD?
The correct answer is C. Disabling ssh access for root. This question identifies a common security best practice for hardening the SSH daemon on Linux systems.
Question
Which of the following is considered a best practice for hardening SSHD?
Options
- AUsing portknocking to protect ssh access for root
- BCompletely disabling ssh access
- CDisabling ssh access for root
- DRenaming root to a random name
How the community answered
(39 responses)- B3% (1)
- C95% (37)
- D3% (1)
Why each option
This question identifies a common security best practice for hardening the SSH daemon on Linux systems.
While port knocking can add a layer of obfuscation, it's generally considered less robust and more complex than simply disabling direct root login and is not the primary best practice for *root* access itself.
Completely disabling SSH access would prevent remote administration entirely, which is impractical for most server environments and defeats the purpose of securing SSH.
Disabling direct SSH login for the `root` user (`PermitRootLogin no` in `sshd_config`) is a strong security best practice. This forces administrators to log in as a regular user first and then use `su` or `sudo` to gain root privileges, adding an extra layer of authentication and reducing the attack surface against the highly privileged root account.
Renaming the `root` user is generally not recommended as it can break system utilities and expectations about the `root` account, causing more problems than it solves.
Concept tested: SSHD security hardening (disabling root login)
Source: https://docs.oracle.com/en/operating-systems/oracle-linux/8/security/sec-ssh-configuration.html#sec-ssh-disable-root-login
Topics
Community Discussion
No community discussion yet for this question.