[Bug 2577] Port Forwarding on Proxy with ProxyCommand ssh -W does not work / bad file descriptor

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Wed Jun 1 11:27:59 AEST 2016


Darren Tucker <dtucker at zip.com.au> changed:

           What    |Removed                     |Added
                 CC|                            |dtucker at zip.com.au

--- Comment #2 from Darren Tucker <dtucker at zip.com.au> ---
(In reply to jan.stuehler from comment #0)
> Port Forwarding on the proxy does not work.

That's deliberate.  In ssh.c where it handles the 'W' option:

  options.request_tty = REQUEST_TTY_NO;
  no_shell_flag = 1;
  options.clear_forwardings = 1;
  options.exit_on_forward_failure = 1;

The reason for it is that we need to fail if we can't do the stdio
forward, and right now it's all or nothing so the second and subsequent
attempts to use use the jumphost will fail (and possibly the first too,
eg if the port is busy).

Right now because of the way the first-match options parsing works you
can't override the value by setting ClearAllForwardings=no either.

> Debug shows "debug1: getpeername failed: Bad file descriptor".

That's harmless.  The port forwarding message in the protocol has a
field for the source address of the forwarded connection, and when the
forwarding code tries to look up the source address of stdin it can't,
so it uses the string "UNKNOWN" instead.

You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.

More information about the openssh-bugs mailing list