mediumMultiple ChoiceObjective-mapped
XK0-006 Practice Question: Restrict SSH access to only users in the…
An administrator wants to restrict SSH access to only users in the 'sshusers' group. Which configuration should be added to /etc/ssh/sshd_config?
⚠ Common exam trap
Many candidates confuse `AllowUsers` (which matches usernames) with `AllowGroups` (which matches group names), leading them to incorrectly select Option A thinking it applies to the group name.
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
✓
AllowGroups sshusers
The `AllowGroups` directive in `/etc/ssh/sshd_config` restricts SSH login to users who are members of the specified group. By setting `AllowGroups sshusers`, only users belonging to the 'sshusers' group will be permitted to authenticate via SSH, while all others are denied. This matches the administrator's requirement precisely.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
AllowUsers sshusers
Why it's wrong here
This allows a user named 'sshusers', not the group.
- ✗
DenyUsers sshusers
Why it's wrong here
This denies users in the group, not allows.
- ✓
AllowGroups sshusers
Why this is correct
This allows only users in the sshusers group.
- ✗
PermitRootLogin no
Why it's wrong here
This disables root login, not group-based access.
Go deeper
Related to this question
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 →
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.