nerdexam
CompTIACompTIA

XK0-005 · Question #831

XK0-005 Question #831: Real Exam Question with Answer & Explanation

The correct answer is C: ssh-add. To avoid repeatedly entering the passphrase for a password-protected SSH key, the ssh-add command adds the key to the ssh-agent, which then manages the key for subsequent SSH connections.

System Management

Question

A systems administrator wants to leverage their password-protected SSH key to connect to multiple servers without entering their password every time. Which of the following commands should the administrator use?

Options

  • Assh-copy-id
  • Bssh-agent
  • Cssh-add
  • Dssh-keygen

Explanation

To avoid repeatedly entering the passphrase for a password-protected SSH key, the ssh-add command adds the key to the ssh-agent, which then manages the key for subsequent SSH connections.

Common mistakes.

  • A. ssh-copy-id is used to copy a public SSH key to a remote server's authorized_keys file, enabling passwordless login to that server, but it does not manage the passphrase for a local private key.
  • B. ssh-agent is the background program that holds the private keys and performs authentication, but ssh-add is the command used to load keys into the agent, not ssh-agent itself.
  • D. ssh-keygen is used to generate new SSH key pairs (public and private keys), not to manage existing keys with an agent.

Concept tested. SSH key management with ssh-agent

Reference. https://man7.org/linux/manpages/man1/ssh-add.1.html

Topics

#SSH#Key Management#ssh-agent#Authentication

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions