ssh2 icon indicating copy to clipboard operation
ssh2 copied to clipboard

Problem with forwardOut to disabled port by firewall.

Open wellbeck190 opened this issue 8 years ago • 2 comments

I tested in two case:

  1. I forwardOut to a closed port but is enable by ufw, I recieve callback with error (CONNECTED_FAILED)
  2. 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.

wellbeck190 avatar Apr 13 '18 06:04 wellbeck190

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).

mscdex avatar Apr 13 '18 09:04 mscdex

Thank @mscdex

wellbeck190 avatar Apr 13 '18 12:04 wellbeck190