I'm trying to set up a Windows OpenSSH Server (v220.127.116.11-Beta) and I've hit a problem.
I have a program that uses plink to create ssh connections. This can range from 1-200 connections and I'm pretty sure that should be safe. However, when I've made 50, EXACTLY 50 ssh connections, the ssh server starts rejecting the connections and looking at the logs, it shows that the posix_spawn failed and it can no longer instantiate child processes to handle the connections
I've tried this link and it didn't do anything for it. I'd really appreciate your help. Thank you!
Here is the error log when the 51st connection is made
1656 2018-03-05 16:08:05.610 debug3: fd 5 is not O_NONBLOCK 1656 2018-03-05 16:08:05.610 debug3: spawning "C:\\OpenSSH\\sshd.exe" "-R" 1656 2018-03-05 16:08:05.610 error: posix_spawn failed 1656 2018-03-05 16:08:05.610 debug3: send_rexec_state: entering fd = 8 config len 357 1656 2018-03-05 16:08:05.610 debug3: ssh_msg_send: type 0 1656 2018-03-05 16:08:05.610 debug3: send_rexec_state: done 1656 2018-03-05 16:08:05.610 debug3: ReadFileEx() ERROR:109, io:00000010C2BF98B0
Here is my config
Subsystem sftp sftp-server.exe LogLevel Debug3 AllowAgentForwarding yes AllowTcpForwarding yes GatewayPorts yes TCPKeepAlive yes MaxStartups 1000 PasswordAuthentication yes PermitTTY yes PidFile C:/ProgramData/ssh/sshd.pid MaxSessions 1000