Courseiva
System SecurityeasyMultiple SelectObjective-mapped

LPIC-2 System Security Practice Question

Which TWO of the following actions are recommended to improve SSH server security?

⚠ Common exam trap

It's easy for candidates to confuse `PermitEmptyPasswords` with `PasswordAuthentication`, thinking only one is needed, or they mistakenly believe that `AllowUsers` supports wildcard patterns like shell globs, when in fact it only matches exact user names or user@host combinations.

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

PermitEmptyPasswords no

Setting `PermitEmptyPasswords no` in `/etc/ssh/sshd_config` explicitly disallows login attempts with empty passwords, closing a trivial authentication bypass vector. This directive is enforced by the SSH daemon before any PAM or password verification occurs, making it a fundamental hardening step.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • PermitEmptyPasswords no

    Why this is correct

    Preventing empty passwords eliminates a major vulnerability where an account could have no password set.

  • PasswordAuthentication no

    Why this is correct

    Disabling password authentication forces key-based authentication, which is more secure against brute-force attacks.

  • AllowUsers *.example.com

    Why it's wrong here

    Restricting users by domain may reduce exposure but a wildcard domain is broad and not a primary security measure.

  • PermitRootLogin yes

    Why it's wrong here

    Allowing root login over SSH increases attack surface and is not recommended.

  • UsePAM yes

    Why it's wrong here

    While PAM is commonly used, its presence alone does not improve security; misconfiguration can be harmful.

About these practice questions

One of 507 original LPIC-2 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 →

How Courseiva writes practice questions · Editorial policy

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.