Multiple (multiplexed) simultaneous ssh connections - Cygwin bug?

Goldburt, Dan Dan.Goldburt at dowjones.com
Sat Sep 9 02:42:46 EST 2006


Tucker, Darren wrote:
> 
> You'll have the stdout and stderr descriptors in the
> select's readset,
> which for FD_SETSIZE=64 puts the limit at around 30
> connections or so
> (assuming you're not port forwarding or something too).
> What did you
> bump MAX_SESSIONS to?  It might be overrunning the fd_set.

I set MAX_SESSIONS to 128.
I think I'm definitely overrunning the fd_set. Running the test again
with a just started sshd instance, I get the error fcntl(31, F_GETFL,
0). So the limit seems to be 30 fds, or 10 connections (3 fd per
connection).

Where is FD_SETSIZE set in cygwin? Any chance this can be bumped up?

> 
> To make this work, you would probably need to break the
> select into
> FD_SETSIZE chunks somehow.
> 

I'm in over my head! How do I do that? Is this something that can be
changed in the sshd code? As far as I can tell, sshd calls fcntl(fd,
F_GETFL, 0), not select() directly. To be honest I have little idea as
to how file descriptors work, and what the fd_set that I am over-running
is. I'm going to do some research.



More information about the openssh-unix-dev mailing list