| Summary: | "LocalCommand" is executed before session is set up | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | h.goebel | ||||
| Component: | ssh | Assignee: | Damien Miller <djm> | ||||
| Status: | CLOSED FIXED | ||||||
| Severity: | normal | CC: | bjoern | ||||
| Priority: | P2 | ||||||
| Version: | 4.5p1 | ||||||
| Hardware: | ix86 | ||||||
| OS: | Linux | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 1289 | ||||||
| Attachments: |
|
||||||
|
Description
h.goebel
2006-09-18 22:17:54 AEST
I see the same problem here with openssh 4.5p1. I run "exim -qff" to forcably flush the mail queue (which should be done via a forwarded port) but it hangs. Running "netstat -an" as LocalCommand shows that the local portforwardings are listening but there is no connection established, which is why my LocalCommand hangs. The man page just says "command to execute on the local machine after successfully connecting the server" which does not say if connection setup is ready and tunnel/portforwardings are established. But IMHO only that would make sense. Created attachment 1310 [details]
Request tunnel earlier
This patch causes tunnel forwarding to be requested before local_command is executed. Can you please give it a try?
Please note that because the tunnel open is processed asynchronously by the server, its end may not be open (indeed, it may never open if the server denies the request). The client end, where local_command is run, will be open.
This patch will also make tunnel forwarding honour ExitOnForwardFailure for local errors (but not remote).
This patch has been applied and will be in the 4.7 release. Close resolved bugs after release. |