nerdexam
CompTIA

LX0-104 · Question #455

Which configuration option can you use to prevent the root user from logging directly onto a machine using ssh?

The correct answer is B. PermitRootLogin No. The SSH server configuration file, sshd_config, contains a specific directive to control whether the root user is allowed to log in directly via SSH.

Security

Question

Which configuration option can you use to prevent the root user from logging directly onto a machine using ssh?

Options

  • ANoRootLogon
  • BPermitRootLogin No
  • CNoRootLogon Yes
  • DRootLogin = No
  • EProhibitRootLogon No

How the community answered

(28 responses)
  • B
    86% (24)
  • C
    4% (1)
  • D
    4% (1)
  • E
    7% (2)

Why each option

The SSH server configuration file, `sshd_config`, contains a specific directive to control whether the root user is allowed to log in directly via SSH.

ANoRootLogon

`NoRootLogon` is not a standard or recognized directive in the `sshd_config` file for preventing root login.

BPermitRootLogin NoCorrect

The `PermitRootLogin No` directive in the SSH server's configuration file (`/etc/ssh/sshd_config`) prevents the root user from logging in directly via SSH for security reasons, often requiring users to log in as a regular user and then use `su` or `sudo`.

CNoRootLogon Yes

`NoRootLogon Yes` is not a standard `sshd_config` directive.

DRootLogin = No

`RootLogin = No` is not the correct syntax or directive for preventing root login in `sshd_config`; the correct directive is `PermitRootLogin`.

EProhibitRootLogon No

`ProhibitRootLogon No` is not a standard or recognized directive in the `sshd_config` file.

Concept tested: SSH server security configuration for root login

Source: https://man7.org/linux/man-pages/man5/sshd_config.5.html

Topics

#SSH#root login#PermitRootLogin#security configuration

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice