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.
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)- A14% (5)
- B8% (3)
- C76% (28)
- D3% (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.
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.
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.
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.
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
Community Discussion
No community discussion yet for this question.