Bug 1610

Summary: LocalCommand is executed to early
Product: Portable OpenSSH Reporter: fs-linux_bug
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: normal CC: djm
Priority: P2    
Version: 5.1p1   
Hardware: All   
OS: Linux   
Bug Depends on:    
Bug Blocks: 1626    
Attachments:
Description Flags
Delay execution of localcommand a tiny bit none

Description fs-linux_bug 2009-06-15 05:13:35 AEST
If using ssh with "ControlMaster auto" and public key authentication, the LocalCommand is executed before the control socket is setup. This results in an endless loop of 'Enter passphrase for key $path/to/key' questions,
if the LocalCommand is a command that uses ssh (in this case: unison to automatically sync two folders on every connect).
Comment 1 Damien Miller 2009-10-06 17:01:39 AEDT
Created attachment 1698 [details]
Delay execution of localcommand a tiny bit

Could you please try this patch?
Comment 2 fs-linux_bug 2009-10-15 04:43:05 AEDT
The patch doesn't help, it only changes the problem. One did not get the "Enter passphrase"-loop now, with this patch unison executes ssh, but this ssh-client, which uses the master, seems not able to use the connection and just hangs (I didn't test how whether there's some kind of timeout if I wait _long_ enough, I killed ssh after 7 minutes)
Comment 3 Damien Miller 2009-10-15 21:21:22 AEDT
Could you enable debugging on both the master and slave ssh commands and attach the output?
Comment 4 fs-linux_bug 2009-10-19 06:39:31 AEDT
Send via email
Comment 5 Damien Miller 2009-11-10 14:04:01 AEDT
from email discussion: the reporter was running an interactive program that expected to have access to the up SSH connection. This is outside the intended usage of LocalCommand, which was provided to allow one-off initialisation of tunnels, etc. In particular, ssh(1) execution is blocked while the LocalCommand is executing, so there is no access to the SSH connection possible.

I have updated the manpage to explain the constraints better, but the constraints themselves will not be changing.
Comment 6 Darren Tucker 2010-03-26 10:50:57 AEDT
With the release of 5.4p1, this bug is now considered closed.