LFCS · Question #533
Which of the following commands is used to hold keys during a login session to be used for automatic authentication while logging in to other machines using ssh?
The correct answer is B. ssh-agent. The ssh-agent command is a program that holds private keys during a login session for automatic SSH authentication without repeated passphrase entry.
Question
Options
- Asshd
- Bssh-agent
- Cssh-keygen
- Dssh-add
How the community answered
(44 responses)- A2% (1)
- B95% (42)
- C2% (1)
Why each option
The `ssh-agent` command is a program that holds private keys during a login session for automatic SSH authentication without repeated passphrase entry.
`sshd` is the SSH daemon, which runs on the server to listen for and accept incoming SSH connections, not to hold client authentication keys.
`ssh-agent` runs in the background and stores decrypted private keys in memory, making them available for SSH clients without requiring the user to type the passphrase each time. This provides convenience and enhanced security by preventing keys from being left unprotected on disk for frequent use.
`ssh-keygen` is used to generate, manage, and convert authentication keys for SSH, not to hold them in an agent during a session.
`ssh-add` is used to add private key identities to the authentication agent (`ssh-agent`), but `ssh-agent` itself is the program that holds and manages these keys.
Concept tested: SSH agent key management
Source: https://manpages.ubuntu.com/manpages/jammy/man1/ssh-agent.1.html
Topics
Community Discussion
No community discussion yet for this question.