[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#794063: ssh with ControlMaster and ControlPath hangs on 2nd session in same terminal



Package: openssh-client
Version: 1:6.7p1-5
Severity: normal
File: /usr/bin/ssh

Hello,

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.

My bet is on ssh being confused on two commands with the same
controlling terminal.

Best regards
Uwe

-- System Information:
Debian Release: 8.1
  APT prefers proposed-updates
  APT policy: (900, 'proposed-updates'), (900, 'stable'), (800, 'testing'), (600, 'unstable'), (500, 'oldoldstable'), (500, 'experimental'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages openssh-client depends on:
ii  adduser           3.113+nmu3
ii  dpkg              1.17.25
ii  libc6             2.19-18
ii  libedit2          3.1-20140620-2
ii  libgssapi-krb5-2  1.12.1+dfsg-19
ii  libselinux1       2.3-2
ii  libssl1.0.0       1.0.1k-3+deb8u1
ii  passwd            1:4.2-3
ii  zlib1g            1:1.2.8.dfsg-2+b1

Versions of packages openssh-client recommends:
ii  xauth  1:1.0.9-1

Versions of packages openssh-client suggests:
pn  keychain      <none>
pn  libpam-ssh    <none>
pn  monkeysphere  <none>
pn  ssh-askpass   <none>

-- no debconf information


Reply to: