LPIC-1 GNU and Unix Commands Practice Question
Exhibit
# /etc/ssh/sshd_config snippet
PermitRootLogin no
PasswordAuthentication yes
ChallengeResponseAuthentication no
UsePAM yes
AllowUsers alice bob
DenyUsers charlie
Match User alice
PasswordAuthentication no
Match User bob
PasswordAuthentication yesRefer to the exhibit. Which of the following is true about SSH access to this server?
⚠ Common exam trap
Watch out — candidates often assume `PasswordAuthentication no` blocks all access, but `DenyUsers` is a separate, pre-authentication block that overrides other settings for specific users.
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
✓
User 'charlie' is denied access regardless of authentication method.
The exhibit shows an SSH configuration with a `DenyUsers charlie` directive, which explicitly blocks user 'charlie' from any SSH access regardless of the authentication method (password, public key, etc.). This directive takes precedence over any other authentication settings, making option A correct.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
User 'charlie' is denied access regardless of authentication method.
Why this is correct
DenyUsers charlie explicitly denies access to user charlie.
- ✗
User 'alice' can authenticate using a password.
Why it's wrong here
The Match block for alice sets PasswordAuthentication no.
- ✗
Password authentication is disabled for all users.
Why it's wrong here
Global PasswordAuthentication yes is overridden per user; bob has it enabled.
- ✗
Root can log in with a password.
Why it's wrong here
PermitRootLogin no prevents root login.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-1 question from scratch — 527 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-1 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-1 exam.