Courseiva

LFCS User and Group Management Practice Question

Order the steps to set up passwordless SSH key-based authentication.

Drag or tap steps into the slots.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5

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

✓

Generate SSH key pair using ssh-keygen, then copy the public key to the remote server using ssh-copy-id, then set correct permissions on the remote server (chmod 700 ~/.ssh and chmod 600 ~/.ssh/authorized_keys), then test the SSH login without a password prompt.

Key generation, copying, and testing are essential; permissions and file verification ensure security.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Generate SSH key pair using ssh-keygen, then copy the public key to the remote server using ssh-copy-id, then set correct permissions on the remote server (chmod 700 ~/.ssh and chmod 600 ~/.ssh/authorized_keys), then test the SSH login without a password prompt.

    Why this is correct

    This order ensures that the keys are created first, then securely copied, permissions are locked down to prevent unauthorized access, and finally the setup is verified. It follows standard security practices.

  • ✗

    Copy the public key to the remote server using ssh-copy-id first, then generate the SSH key pair, then set permissions, then test login.

    Why it's wrong here

    This is incorrect because you cannot copy a key that hasn't been generated yet. The key pair must be created before the public key can be transferred.

  • ✗

    Generate SSH key pair, then set permissions on the remote server, then test login, then copy the public key.

    Why it's wrong here

    This is incorrect because testing login before copying the public key will fail, and setting permissions on the remote server before copying the key is pointless as the authorized_keys file doesn't exist yet.

  • ✗

    Generate SSH key pair, then set permissions on the local machine, then copy the public key to the remote server, then test login.

    Why it's wrong here

    This is incorrect because setting permissions on the local machine is unnecessary for SSH key-based authentication; the permissions that matter are on the remote server's ~/.ssh directory and authorized_keys file.

About these practice questions

Courseiva writes every LFCS question from scratch — 406 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 →

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.