hardMultiple Choice
XK0-006 Practice Question: An administrator is configuring a chroot jail for…
An administrator is configuring a chroot jail for an SFTP user. Which directive in /etc/ssh/sshd_config is used for this purpose?
⚠ Common exam trap
A common mix-up: candidates confuse the directive that enables SFTP (Subsystem or ForceCommand) with the directive that actually creates the chroot jail (ChrootDirectory), leading them to select a functional but incomplete option.
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
✓
ChrootDirectory /home/%u
The ChrootDirectory directive in /etc/ssh/sshd_config specifies the path to the directory that will be used as a chroot jail for the user. When set to /home/%u, %u is replaced by the username, confining the SFTP user to their home directory. This is the standard way to restrict an SFTP user's file system access to a specific directory tree.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
ChrootDirectory /home/%u
Why this is correct
ChrootDirectory confines an SFTP session to the specified path, with %u expanding to the authenticated username, so each user is jailed in their own home directory. This satisfies the stem's requirement for a per-user chroot jail in sshd_config.
- ✗
Subsystem sftp internal-sftp
Why it's wrong here
The Subsystem directive only registers the internal-sftp handler, replacing the external sftp-server binary; it does not confine users to a directory. It is tempting because internal-sftp is required for chroot to work at all, but the confinement itself comes from the ChrootDirectory directive, which this option omits.
- ✗
ForceCommand internal-sftp
Why it's wrong here
ForceCommand internal-sftp forces the SFTP subsystem for matched users, preventing shell access, but it does not set a root directory. It is tempting because it is commonly paired with chroot in real sshd_config files, yet confinement requires the separate ChrootDirectory directive, which this option does not provide.
- ✗
Match Group sftpusers
Why it's wrong here
Match Group selects which users the following directives apply to; it performs no confinement by itself. It is tempting because a chroot jail is normally scoped to an SFTP group, so Match Group appears in the working configuration, but the actual jail is created by ChrootDirectory inside that block.
Go deeper
Related to this question
Learn chapter
File Permissions and Ownership
Key term
SSH
SSH (Secure Shell) is a cryptographic network protocol that provides secure, encrypted communication and remote administration between two devices over an unsecured network.
Key term
User
A user is any person, system, or device that interacts with an IT service, resource, or identity system, typically authenticated through credentials and authorized to perform specific actions.
About these practice questions
Courseiva writes every XK0-006 question from scratch — 781 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.