hardMultiple SelectObjective-mapped
XK0-006 Practice Question: Which TWO commands are used to manage SSH…
Which TWO commands are used to manage SSH key-based authentication processes? (Choose exactly two.)
⚠ Common exam trap
CompTIA often tests the distinction between key generation/distribution commands (`ssh-keygen`, `ssh-copy-id`) and agent management commands (`ssh-agent`, `ssh-add`), leading candidates to mistakenly select agent-related options for managing authentication processes.
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
✓
ssh-keygen
The `ssh-keygen` command generates the public and private key pair used for SSH key-based authentication, while `ssh-copy-id` installs the public key on a remote server's `~/.ssh/authorized_keys` file, enabling passwordless login. Together, they form the core workflow for setting up SSH key authentication.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
ssh-keygen
Why this is correct
Generates public/private key pairs for SSH.
- ✗
ssh-add
Why it's wrong here
Adds private keys to ssh-agent, not for initial setup.
- ✓
ssh-copy-id
Why this is correct
Copies the public key to remote server's authorized_keys.
- ✗
ssh-keyscan
Why it's wrong here
Gathers public host keys from remote servers, does not manage user keys.
- ✗
ssh-agent
Why it's wrong here
Manages private keys in memory but is not used for initial key management.
Go deeper
Related to this question
About these practice questions
One of 979 original XK0-006 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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.