[Bug 2437] New: ssh with ControlMaster and ControlPath hangs on 2nd session in same terminal

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri Jul 31 05:13:50 AEST 2015


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

            Bug ID: 2437
           Summary: ssh with ControlMaster and ControlPath hangs on 2nd
                    session in same terminal
           Product: Portable OpenSSH
           Version: 6.7p1
          Hardware: amd64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: uwe+mindrot at kleine-koenig.org

with two terminals a hang can be reproduces as follows:

 - In terminal 1 do:

     ssh -o "ControlMaster auto" -o "ControlPath
~/.ssh/sshctrl-%l-%h-%p-%r" localhost

 - In terminal 2 do the same:

     ssh -o "ControlMaster auto" -o "ControlPath
~/.ssh/sshctrl-%l-%h-%p-%r" localhost

 - Then back in terminal 1 again:

     logout

   This doesn't terminate the ssh-command to keep the control socket
   open. Then pressing Ctrl-Z and run bg to send the ssh into the
   background.

 - The "remote" shell in the 2nd terminal is still working.

 - Now repeat the ssh command in the first terminal:

    ssh -o "ControlMaster auto" -o "ControlPath
~/.ssh/sshctrl-%l-%h-%p-%r" localhost

Both sessions don't react any more. The only way I found to resolve up
to now is to kill all related ssh sessions with kill(1).

Note that just exiting the first shell after sending the ssh process
that created the control socket in the background works fine. Also
adding new sessions in a third terminal works then.

Note this is already reported to the Debian bug tracker under
https://bugs.debian.org/794063 and I was asked to forward it here.

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


More information about the openssh-bugs mailing list