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: [email protected]
          Reporter: [email protected]

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.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to