[Bug 3181] New: ssh-agent doesn't exit automatically after child program exits

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Mon Jun 15 03:21:46 AEST 2020


https://bugzilla.mindrot.org/show_bug.cgi?id=3181

            Bug ID: 3181
           Summary: ssh-agent doesn't exit automatically after child
                    program exits
           Product: Portable OpenSSH
           Version: 8.0p1
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P5
         Component: ssh-agent
          Assignee: unassigned-bugs at mindrot.org
          Reporter: zergpro+openssh at yandex.ru

Man page for ssh-agent specifically documents the following:

"The agent exits automatically when the command given on the command
line terminates."

But actual behaviour differs from that documented.

Steps to reproduce:

$ ps -ef | grep agent
user 20020 18231  0 17:11 pts/0    00:00:00 grep agent
$ ssh-agent /bin/bash
$ ps -ef | grep agent
user 20024 20023  0 17:11 ?        00:00:00 ssh-agent /bin/bash
user 20050 20023  0 17:12 pts/0    00:00:00 grep agent
$ exit
exit
$ ps -ef | grep agent

Expected result:
user 20054 18231  0 17:12 pts/0    00:00:00 grep agent
$

Actual result:
user 20024     1  0 17:11 ?        00:00:00 ssh-agent /bin/bash
user 20054 18231  0 17:12 pts/0    00:00:00 grep agent
$

ssh-agent process doesn't terminate.

Reproduced on 2 environments:

1. OpenCYGWIN_NT-10.0 3.0.7(0.338/5/3) 2019-04-30 18:08 x86_64
CygwinSSH_8.1p1, OpenSSL 1.1.1d  10 Sep 2019


2. OpenSSH_8.0p1, OpenSSL 1.1.1c FIPS  28 May 2019
Linux 4.18.0-147.3.1.el8_1.x86_64 #1 SMP Fri Jan 3 23:55:26 UTC 2020
x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux 8 (Core)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list