-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ssh.exe local port forwarding limited to 32 connections #191
Comments
This is due to a internal enforced limit. This can be upped a bit more but making it boundless requires a multi threaded solution that I would like to avoid. |
@manojampalam Ah yes you ran into an inherent design flaw in Windows. It's not the first you will hit. Knowing the flaws involved when I attempted to plan a port, I'm surprised that MS didn't just decide to fix the Windows problems first. Problem #1: Can't wait for thousands of handles per thread. Problem #2: Can't create anything like a PTY so a console app that wants to change TTY settings does not signal the server end and so it doesn't pass down the network pipe. Problem #3: Trying UTF-8 on the console explodes, but essentially all ssh links are either UTF-8 Text or binary and ssh can't tell the difference. |
I am using "OpenSSH for Windows" version 0.0.22.0 at @manojampalam |
@nkrepo there were no changes in the limit. Can you share your repro steps? |
@manojampalam
|
Try with -4 parameter. My guess is you are ending up listening on IPv6 address too for each forwarded port. That will double the number of sockets you are listening on. |
@manojampalam you are correct it was binding to both IPv4 and IPv6 address now it works up to 32 local port forwards. I had disabled IPv6 for the physical network adapter but not system-wide, therefore the
|
PowerShell/Win32-OpenSSH#1096 PowerShell/Win32-OpenSSH#191 - Updated wait_for_multiple_objects_enhanced() to handle a no-event request while alterable. - Simplified wait_for_any_event() to by taking advantage of no-event alterable request in wait_for_multiple_objects_enhanced(). - Updated wait_for_any_event() to use MAX_CHILDREN limit instead of MAXIMUM_WAIT_OBJECTS limit. - Removed unnecessary ZeroMemory() call. - Created distinct definition MAXIMUM_WAIT_OBJECTS_ENHANCED and modified functions to use it. - Upped w32_select() event limit. - Modified wait_for_multiple_objects_enhanced() to allow for 0 millisecond wait.
I have an ssh server which I am using to tunnel connections to remote servers. In my .ssh\config file I have lots (>32) of LocalForward directives for this server like so:
LocalForward 127.0.0.1:13389 remoteserver.localnet:3389
When my config file contains more than 32 LocalForward directives I can no longer connect to my jumphost. I receive the error
select: Overlapped I/O operation is in progress.
. If I limit the LocalForward directives to 32 then I can successfully connect.This seems to have been introduced in release 3_19_2016 which I believe included new I/O code. Release 2_25_2016 allows me to connect to my jumphost with more than 32 local port forwardings.
The text was updated successfully, but these errors were encountered: