nerdexam
CompTIA

XK0-005 · Question #768

An administrator needs to allow remote administrative access to a Linux server only to employees who are using the authorized private key. Which of the following options should the administrator set…

The correct answer is D. PasswordAuthentication no. Setting 'PasswordAuthentication no' in the SSHD configuration file (/etc/ssh/sshd_config) disables password-based login entirely, forcing all users to authenticate using SSH key pairs. Only employees with an authorized private key (whose public key is listed in…

Security

Question

An administrator needs to allow remote administrative access to a Linux server only to employees who are using the authorized private key. Which of the following options should the administrator set in the SSHD configuration file to achieve the goal?

Options

  • AAuthorizedKeysCommand sudo
  • BPermitRootLogin prohibit-password
  • CAuthorizedKeysCommandUser root
  • DPasswordAuthentication no

How the community answered

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

Explanation

Setting 'PasswordAuthentication no' in the SSHD configuration file (/etc/ssh/sshd_config) disables password-based login entirely, forcing all users to authenticate using SSH key pairs. Only employees with an authorized private key (whose public key is listed in ~/.ssh/authorized_keys) can connect. 'PermitRootLogin prohibit-password' only restricts root specifically. 'AuthorizedKeysCommand' and 'AuthorizedKeysCommandUser' are used to specify an external program to retrieve authorized keys dynamically, but they do not disable password authentication on their own.

Topics

#SSH#Authentication#Security Configuration#Linux

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice