Bug 2381 - foreground mode for ssh-agent
Summary: foreground mode for ssh-agent
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh-agent (show other bugs)
Version: 6.8p1
Hardware: Other Linux
: P5 enhancement
Assignee: Damien Miller
URL:
Keywords:
Depends on:
Blocks: V_6_9
  Show dependency treegraph
 
Reported: 2015-04-15 21:27 AEST by Igor Bukanov
Modified: 2016-08-02 10:41 AEST (History)
2 users (show)

See Also:


Attachments
Add ssh-agent -D flag for foreground without debug (2.77 KB, patch)
2015-04-24 13:53 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 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