Courseiva
NetworkinghardMultiple ChoiceObjective-mapped

LFCS Networking Practice Question

A system administrator needs to securely transfer files between two Linux servers using port 22. The administrator uses the following command: 'scp file.txt user@remote:/tmp/'. The transfer fails with the error 'Permission denied (publickey)'. What is the most likely cause?

⚠ Common exam trap

Test-takers frequently confuse network-level issues (firewall, service status) with authentication-level errors, but the specific 'Permission denied (publickey)' message directly points to SSH key authentication failure, not connectivity or service availability.

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 client's public key is not in the remote user's authorized_keys file.

The error 'Permission denied (publickey)' indicates that the SSH key-based authentication failed. SCP uses SSH for transport, and by default, SSH on the remote server checks the client's public key against the remote user's ~/.ssh/authorized_keys file. If the client's public key is not listed there, the SSH server rejects the connection, causing the SCP transfer to fail.

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 client's public key is not in the remote user's authorized_keys file.

    Why this is correct

    'Permission denied (publickey)' indicates key authentication failed.

  • The remote server does not have SSH installed.

    Why it's wrong here

    Similar to A, would not get publickey error.

  • The SSH service is not running on the remote server.

    Why it's wrong here

    Would give 'Connection refused', not 'Permission denied'.

  • The remote server's firewall is blocking port 22.

    Why it's wrong here

    Would timeout or show 'no route to host'.

About these practice questions

One of 507 original LFCS 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 LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.