Bug 1610 - LocalCommand is executed to early
Summary: LocalCommand is executed to early
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 5.1p1
Hardware: All Linux
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_5_4
  Show dependency treegraph
 
Reported: 2009-06-15 05:13 AEST by fs-linux_bug
Modified: 2023-01-13 13:56 AEDT (History)
1 user (show)

See Also:


Attachments
Delay execution of localcommand a tiny bit (704 bytes, patch)
2009-10-06 17:01 AEDT, Damien Miller
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.