XK0-005 · Question #831
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…
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.
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
How the community answered
(61 responses)- A11% (7)
- B3% (2)
- C80% (49)
- D5% (3)
Why each option
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.
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.
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.
The ssh-add command adds private key identities to the authentication agent (ssh-agent). When a password-protected SSH key is added to the ssh-agent using ssh-add, the passphrase only needs to be entered once, and the agent handles subsequent authentication requests.
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
Source: https://man7.org/linux/manpages/man1/ssh-add.1.html
Topics
Community Discussion
No community discussion yet for this question.