mediumMultiple ChoiceObjective-mapped
XK0-006 Practice Question: Ensure that the SSH service only allows key-based…
An administrator needs to ensure that the SSH service only allows key-based authentication and disables password authentication. Which configuration file and directive should be modified?
⚠ Common exam trap
Many candidates confuse the client configuration file (/etc/ssh/ssh_config) with the server configuration file (/etc/ssh/sshd_config), leading candidates to select option C, which would have no effect on the SSH server's authentication behavior.
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
✓
/etc/ssh/sshd_config; PasswordAuthentication no
The SSH server configuration file is /etc/ssh/sshd_config, and setting 'PasswordAuthentication no' disables password-based logins, forcing key-based authentication. This directive must be set on the server side (sshd_config), not the client side (ssh_config), to enforce the policy for all incoming SSH connections.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
/etc/ssh/sshd_config; PasswordAuthentication yes
Why it's wrong here
This would enable password authentication, the opposite of what is needed.
- ✗
/etc/ssh/sshd_config; PubkeyAuthentication no
Why it's wrong here
This disables key-based authentication, which is not desired.
- ✗
/etc/ssh/ssh_config; PasswordAuthentication no
Why it's wrong here
ssh_config is for client connections, not the server.
- ✓
/etc/ssh/sshd_config; PasswordAuthentication no
Why this is correct
Correct file and directive to disable password authentication.
Go deeper
Related to this question
Learn chapter
File Permissions and Ownership
Key term
Policy
A policy is a set of rules or guidelines that defines how an organization manages, secures, and operates its IT systems and services.
Key term
Service
A service is a software component or system that performs a specific function and is available to be used by other programs or users over a network.
About these practice questions
This XK0-006 question is part of Courseiva's 979-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
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.