[Bug 2255] New: tunneling with -W does not report non 0 exit codes on failure even with ExitOnForwardFailure=yes

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Wed Jul 16 04:30:15 EST 2014


https://bugzilla.mindrot.org/show_bug.cgi?id=2255

            Bug ID: 2255
           Summary: tunneling with -W does not report non 0 exit codes on
                    failure even with ExitOnForwardFailure=yes
           Product: Portable OpenSSH
           Version: 6.6p1
          Hardware: amd64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: bcg62 at drexel.edu

Currently it looks like there is no way to trap unsuccessful port
forwards using ssh -W

Example:

$ ssh -o ExitOnForwardFailure=yes -W localhost:1590 remotehost
$ echo $?
0

1590 is not listening on remotehost and debug output shows:

channel 0: open failed: connect failed: Connection refused 

But ssh exits with 0.

Changing ExitOnForwardFailure has no effect. 

It should exit(1) like nc does

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list