Bug 2381

Summary: foreground mode for ssh-agent
Product: Portable OpenSSH Reporter: Igor Bukanov <igor>
Component: ssh-agentAssignee: Damien Miller <djm>
Status: CLOSED FIXED    
Severity: enhancement CC: djm, dtucker
Priority: P5    
Version: 6.8p1   
Hardware: Other   
OS: Linux   
Bug Depends on:    
Bug Blocks: 2360    
Attachments:
Description Flags
Add ssh-agent -D flag for foreground without debug dtucker: ok+

Description Igor Bukanov 2015-04-15 21:27:50 AEST
It would be nice to have an option to run ssh-agent in foreground without forking. This will simplify ssh-agent integration with process managers or containers when it is expected that service is not forking.

The current -d flag is not suitable for that as it also activates the debug log.
Comment 1 Damien Miller 2015-04-24 13:53:21 AEST
Created attachment 2602 [details]
Add ssh-agent -D flag for foreground without debug

Sounds reasonable. This adds a -D option (similar to sshd) that puts ssh-agent in the foreground but does not enable debugging. It also bumps the debug level for -d to DEBUG3.

It still prints the shell commands to get the environment to stdout,
since users might want to capture these for sourcing into shell initialisation.

$ ./ssh-agent -D
SSH_AUTH_SOCK=/tmp/ssh-evSXau5OLQvF/agent.11610; export SSH_AUTH_SOCK;
echo Agent pid 11610;
Comment 2 Damien Miller 2015-04-24 15:27:00 AEST
applied - this will be in openssh-6.9
Comment 3 Damien Miller 2016-08-02 10:41:01 AEST
Close all resolved bugs after 7.3p1 release