ssh2
ssh2 copied to clipboard
Problem with forwardOut to disabled port by firewall.
I tested in two case:
- I forwardOut to a closed port but is enable by ufw, I recieve callback with error (CONNECTED_FAILED)
- I forwardOut to a closed port but is disabled by ufw, nothing response or very long time.
How can I setTimeout for forwardOut, or I can cancel it after waiting long time.
Help me! Thanks.
Does the same thing happen with the OpenSSH client (-L...)?
There is no way to cancel a pending channel open request (which is what forwardOut() uses) before the server has either accepted to rejected the request unfortunately (short of tearing down the entire connection of course). We can verify this is what's happening (no server response to request) if you set debug: console.log and then post the resulting console output (censoring server IP address if it's public).
Thank @mscdex