LPIC-2 System Security Practice Question
An administrator wants to chroot SSH users in the 'jailed' group to their home directories. Which configuration in /etc/ssh/sshd_config achieves this?
⚠ Common exam trap
Many candidates confuse 'Match Group' with 'Match User' or invent non-existent directives like 'ChrootJail' or 'ChrootGroup', failing to recall that the correct syntax requires 'Match Group' followed by 'ChrootDirectory'.
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
✓
Match Group jailed ChrootDirectory %h
The Match directive in sshd_config allows conditional configuration blocks based on criteria like group membership. The ChrootDirectory %h directive chroots the user to their home directory, which is the standard method for restricting SSH users to a specific filesystem area. This configuration applies only to users in the 'jailed' group, as required.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Subsystem sftp internal-sftp Match Group jailed ChrootDirectory %h
Why it's wrong here
This is for SFTP chroot, not SSH shell chroot.
- ✗
Match User jailed ChrootDirectory %h
Why it's wrong here
Matches username 'jailed', not the group.
- ✗
ChrootGroup jailed ChrootDirectory %h
Why it's wrong here
No such directive as ChrootGroup.
- ✗
Match Group jailed ChrootJail %h
Why it's wrong here
ChrootJail is not a valid directive.
- ✓
Match Group jailed ChrootDirectory %h
Why this is correct
Matches the group and sets chroot to the home directory.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-2 question from scratch — 507 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 LPIC-2 practice question is part of Courseiva's free LPI 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 LPIC-2 exam.