Hi, In some cases it's necessary to ensure that remote port forwarding has been established properly. Unfortunately it's impossible to do in the current ssh since failure to establish forwarding is not fatal. Attached please find patch which adds new option for ssh (default is off), which allows to make such condition a fatal error, resulting in ssh(1) exiting with error code when one of requested remote forwardings can't be established for some reason. -Maxim
Created attachment 995 [details] Proposed patch.
openssh-4.4 supports an ExitOnForwardFailure option that does this
With the release of 4.4, we believe that this bug is now closed. For information about the release please see http://www.openssh.com/txt/release-4.4 .