nerdexam
Linux_Foundation

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.

Submitted by tom_us· May 4, 2026Security

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)
  • B
    3% (1)
  • C
    95% (37)
  • D
    3% (1)

Why each option

This question identifies a common security best practice for hardening the SSH daemon on Linux systems.

AUsing portknocking to protect ssh access for root

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.

BCompletely disabling ssh access

Completely disabling SSH access would prevent remote administration entirely, which is impractical for most server environments and defeats the purpose of securing SSH.

CDisabling ssh access for rootCorrect

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.

DRenaming root to a random name

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

#SSH Hardening#Root Access Security#Linux Security Best Practices

Community Discussion

No community discussion yet for this question.

Full LFCA Practice