QuestionQ260

Essential Commands

Which command is used to preload and manage the keys that enable automatic authentication when logging in to other machines via SSH?

  • A sshd
  • B ssh-agent
  • C ssh-keygen
  • D ssh-add
Explanation

ssh-agent is the SSH authentication agent: it holds private keys in memory after they are unlocked once, and via environment variables (SSH_AUTH_SOCK, SSH_AGENT_PID) it is automatically located by the ssh client so that subsequent SSH logins to other hosts can be authenticated without re-entering the passphrase each time. This is distinct from ssh-add, which merely adds/loads a specific key into an already-running ssh-agent instance; sshd is the server-side daemon that accepts incoming SSH connections; and ssh-keygen is used to generate new key pairs, not to manage or preload them for authentication sessions.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!