During a routine security audit, Bob discovers that SSH keys were not added to the SSH agent with an expiration time, potentially leaving them loaded indefinitely. For improved security, he decides that keys should be automatically removed from the agent after a certain period of inactivity. What option should Bob include with ssh-add to ensure that a key expires after 1 hour of inactivity?
The command ssh-add -t 3600 adds the private key to the SSH agent with an expiration time of 3600 seconds, which is equivalent to 1 hour. After this time, if not used, the key will be automatically removed from the agent, enhancing security by limiting the timeframe the key is available without user interaction. The options -x, -X, and -T do not serve the purpose described, either because they do not exist or -X unlocks the agent and -T is used for testing purposes in ssh itself, not ssh-add.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does SSH stand for and what is its purpose?
Open an interactive chat with Bash
What is the SSH agent, and why is it important?
Open an interactive chat with Bash
What does the '-t' option do in the ssh-add command?