nerdexam
CompTIA

XK0-006 · Question #50

A Linux administrator just finished setting up passwordless SSH authentication between two nodes. However, upon test validation, the remote host prompts for a password. Given the following logs…

The correct answer is D. The authorized_keys file does not have the correct security context to match SELinux policy. The log shows avc: denied { read } caused by SELinux when sshd tries to access authorized_keys. The file has the wrong SELinux context (unconfined_u:object_r:home_root_t) instead of the expected context for SSH. This mismatch blocks SSH key authentication even though file…

Security

Question

A Linux administrator just finished setting up passwordless SSH authentication between two nodes. However, upon test validation, the remote host prompts for a password. Given the following logs:

Which of the following is the most likely cause of the issue?

Exhibit

XK0-006 question #50 exhibit

Options

  • AThe SELinux policy is incorrectly targeting the unconfined_u context.
  • BThe administrator forgot to restart the SSHD after creating the authorized_keys file.
  • CThe authorized_keys file has the incorrect root permissions assigned.
  • DThe authorized_keys file does not have the correct security context to match SELinux policy.

How the community answered

(32 responses)
  • A
    13% (4)
  • B
    31% (10)
  • C
    6% (2)
  • D
    50% (16)

Explanation

The log shows avc: denied { read } caused by SELinux when sshd tries to access authorized_keys. The file has the wrong SELinux context (unconfined_u:object_r:home_root_t) instead of the expected context for SSH. This mismatch blocks SSH key authentication even though file permissions are correct. Adjusting the SELinux context (e.g., with restorecon) resolves

Topics

#SELinux#SSH#authorized_keys#security context

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice