Bug 2670 - Add ssh_config option that sets the lifetime of the key if added via AddKeysToAgent
Summary: Add ssh_config option that sets the lifetime of the key if added via AddKeysT...
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 7.2p2
Hardware: amd64 All
: P5 enhancement
Assignee: Damien Miller
URL:
Keywords:
: 2191 (view as bug list)
Depends on:
Blocks: V_8_4
  Show dependency treegraph
 
Reported: 2017-01-27 13:45 AEDT by Derek Schrock
Modified: 2021-04-23 14:53 AEST (History)
6 users (show)

See Also:


Attachments
Adds "AddKeysToAgentTimeout" option for ssh_config (4.70 KB, patch)
2018-07-19 20:02 AEST, djl
no flags Details | Diff
Slightly revised patch which tweaks documentation (4.78 KB, patch)
2018-10-08 19:45 AEDT, william
no flags Details | Diff
AddKeysToAgent with interval support (6.37 KB, patch)
2020-08-07 14:10 AEST, Damien Miller
dtucker: ok+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Schrock 2017-01-27 13:45:40 AEDT
Currently you can't set a lifetime for a key added by AddKeysToAgent other than the lifetime set when running ssh-agent with -t.

Add an ssh_config AddKeysToAgentLifetime option to allow the setting of a lifetime if a key is added via AddKeysToAgent.
Comment 1 djl 2018-07-19 20:02:11 AEST
Created attachment 3165 [details]
Adds "AddKeysToAgentTimeout" option for ssh_config

I've attached a patch which provides a "AddKeysToAgentTimeout" option for ssh_config. It's been running on my personal machine for a few weeks without issue but I'd appreciate anyone with more experience looking it over.
Comment 2 william 2018-10-08 19:45:26 AEDT
Created attachment 3188 [details]
Slightly revised patch which tweaks documentation

I've slightly reworded the documentation in the patch from djl@mksh.org, just to specify that the timeout relates to the AddKeysToAgent option. Most of the work is still theirs, including all actual source code changes which I did not touch.
Comment 3 Damien Miller 2020-08-07 14:10:20 AEST
Created attachment 3439 [details]
AddKeysToAgent with interval support

This adds support for specifying an interval to AddKeysToAgent, including requesting both per-use confirmation and an interval via AddKeysToAgent="confirm 5m"
Comment 4 Damien Miller 2020-08-07 14:11:11 AEST
*** Bug 2191 has been marked as a duplicate of this bug. ***
Comment 5 Damien Miller 2020-08-12 15:35:50 AEST
This has been committed and will be in OpenSSH 8.4.
Comment 6 Damien Miller 2021-04-23 14:53:14 AEST
closing resolved bugs as of 8.6p1 release