Courseiva
mediumMultiple ChoiceObjective-mapped

XK0-006 Practice Question: A user is trying to log in to a Linux server via…

A user is trying to log in to a Linux server via SSH but receives 'Permission denied (publickey,gssapi-keyex,gssapi-with-mic)'. The user's public key is in ~/.ssh/authorized_keys with proper permissions (600) and owned by the user. The server's sshd_config has 'PubkeyAuthentication yes' and 'PasswordAuthentication no'. What is the most likely additional cause?

⚠ Common exam trap

CompTIA often tests the subtlety that SSH's `StrictModes` checks parent directory permissions, not just the key file, leading candidates to overlook home directory permissions when the key file itself appears correct.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The user's home directory has incorrect permissions (e.g., group-writable).

SSH server's `StrictModes` (enabled by default) checks that the user's home directory is not group-writable or world-writable. If the home directory has group-write permission (e.g., 775), SSH refuses to trust `~/.ssh/authorized_keys` even if the file itself has 600 permissions. This is a security measure to prevent other group members from modifying the authorized_keys file indirectly.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The server's firewall is blocking port 22.

    Why it's wrong here

    Firewall block would result in 'Connection refused' or timeout, not 'Permission denied'.

  • The user's home directory has incorrect permissions (e.g., group-writable).

    Why this is correct

    SSH enforces strict permissions on home directory; if group-writable, the key authentication is refused.

  • SELinux is blocking the key authentication.

    Why it's wrong here

    SELinux would typically cause AVC denials, not 'Permission denied' specifically on key authentication.

  • The SSH server is not running.

    Why it's wrong here

    If SSH server were not running, the connection would be refused entirely.

About these practice questions

One of 979 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.