nerdexam
IBM

000-221 · Question #213

How can ssh access for root be disabled?

The correct answer is C. Set PermitRootLogin to no in /etc/ssh/sshd_config. Root SSH access is disabled by setting PermitRootLogin to no in the SSH server daemon configuration file sshd_config. This is the standard and correct method across OpenSSH-based systems including AIX.

Security

Question

How can ssh access for root be disabled?

Options

  • ARemove the ssh line from /etc/inetd.conf.
  • BSet rlogin to false in /etc/security/user for root.
  • CSet PermitRootLogin to no in /etc/ssh/sshd_config.
  • DSet RootPasswordAuthentication to no in /etc/ssh/ssh_config

How the community answered

(37 responses)
  • A
    14% (5)
  • B
    8% (3)
  • C
    76% (28)
  • D
    3% (1)

Why each option

Root SSH access is disabled by setting PermitRootLogin to no in the SSH server daemon configuration file sshd_config. This is the standard and correct method across OpenSSH-based systems including AIX.

ARemove the ssh line from /etc/inetd.conf.

Removing SSH from /etc/inetd.conf would only affect SSH if it were managed by inetd, but SSH typically runs as a standalone persistent daemon and is not controlled by inetd.

BSet rlogin to false in /etc/security/user for root.

The rlogin setting in /etc/security/user governs rlogin protocol access, which is a separate service from SSH and has no effect on SSH login behavior.

CSet PermitRootLogin to no in /etc/ssh/sshd_config.Correct

The file /etc/ssh/sshd_config is the OpenSSH server daemon configuration file. Setting PermitRootLogin to 'no' instructs sshd to reject all authentication attempts by the root account, which is the correct and universally supported mechanism for disabling root SSH access on AIX and other Unix-like systems.

DSet RootPasswordAuthentication to no in /etc/ssh/ssh_config

ssh_config (without the 'd') is the SSH client configuration file, not the server file; additionally, RootPasswordAuthentication is not a valid directive in sshd_config.

Concept tested: Disabling root login via SSH server configuration

Source: https://www.ibm.com/docs/en/aix/7.3?topic=file-sshdconfig-file

Topics

#SSH#root login#sshd_config#security hardening

Community Discussion

No community discussion yet for this question.

Full 000-221 Practice