Courseiva
System SecurityhardMultiple SelectObjective-mapped

LPIC-2 System Security Practice Question

Which THREE conditions must be met for an SSH key-based login to succeed using the default settings on a OpenSSH server? (Choose three.)

⚠ Common exam trap

Watch out — candidates often confuse host key verification (known_hosts) with user authentication (authorized_keys), or assume the server's host key is a condition for login success, when in fact it is always present and unrelated to the key-based login flow.

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

The ~/.ssh directory on the remote server has permissions 0700

OpenSSH requires the ~/.ssh directory on the remote server to have permissions 0700 (owner-only read/write/execute) to prevent other users from modifying its contents. If the directory is group- or world-writable, the server will reject key-based authentication as a security measure against unauthorized key injection.

Answer analysis

Option-by-option breakdown

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

  • The ~/.ssh directory on the remote server has permissions 0700

    Why this is correct

    SSH requires strict permissions on .ssh directory.

  • The remote server has the public key appended to ~/.ssh/authorized_keys

    Why this is correct

    Public key must be in authorized_keys.

  • The remote server has the host key /etc/ssh/ssh_host_rsa_key

    Why it's wrong here

    Host key is for server identity, not user authentication.

  • The client has the server's public host key stored in ~/.ssh/known_hosts

    Why it's wrong here

    Needed for host verification, but not requirement for authentication success (can be bypassed).

  • The client has the private key in ~/.ssh/id_rsa

    Why this is correct

    Default private key path for RSA.

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.