Bug 2670

Summary: Add ssh_config option that sets the lifetime of the key if added via AddKeysToAgent
Product: Portable OpenSSH Reporter: Derek Schrock <dereks>
Component: sshAssignee: Damien Miller <djm>
Status: CLOSED FIXED    
Severity: enhancement CC: djl, djm, dtucker, neic, tomo, william
Priority: P5    
Version: 7.2p2   
Hardware: amd64   
OS: All   
Bug Depends on:    
Bug Blocks: 3162    
Attachments:
Description Flags
Adds "AddKeysToAgentTimeout" option for ssh_config
none
Slightly revised patch which tweaks documentation
none
AddKeysToAgent with interval support dtucker: ok+

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