I'm trying to set up an OpenSSH server on an install of Windows Server Enterprise 2007 (SP2). See title. I've included the below lines in my sshd_config
so that the OpenSSH Server Service (which I'll just refer to as "service") outputs debug logs to %ProgramData%\ssh
:
# Logging
SyslogFacility LOCAL0
LogLevel DEBUG3
I've tried connecting through a few different clients (I don't have OpenSSH installed on my own computer and am trying to avoid for other reasons), and all of them fail to connect with something like "Connection closed." (SecureCRT) or "Network error: Software caused connection abort" (PuTTY/WinSCP). The debug logs show something like the below:
25380 2020-03-26 17:54:44.326 debug1: Bind to port 22 on ::.
25380 2020-03-26 17:54:44.327 Server listening on :: port 22.
25380 2020-03-26 17:54:44.327 debug2: fd 4 setting O_NONBLOCK
25380 2020-03-26 17:54:44.327 debug1: Bind to port 22 on 0.0.0.0.
25380 2020-03-26 17:54:44.329 Server listening on 0.0.0.0 port 22.
25380 2020-03-26 17:54:56.983 debug3: fd 5 is not O_NONBLOCK
25380 2020-03-26 17:54:56.984 debug3: spawning "C:\\Program Files\\OpenSSH\\sshd.exe" -R
25380 2020-03-26 17:54:56.986 debug3: send_rexec_state: entering fd = 8 config len 326
25380 2020-03-26 17:54:56.986 debug3: ssh_msg_send: type 0
25380 2020-03-26 17:54:56.986 debug3: send_rexec_state: done
25380 2020-03-26 17:57:47.344 debug3: fd 5 is not O_NONBLOCK
25380 2020-03-26 17:57:47.345 debug3: spawning "C:\\Program Files\\OpenSSH\\sshd.exe" -R
25380 2020-03-26 17:57:47.347 debug3: send_rexec_state: entering fd = 8 config len 326
25380 2020-03-26 17:57:47.347 debug3: ssh_msg_send: type 0
25380 2020-03-26 17:57:47.347 debug3: send_rexec_state: done
Meanwhile, if I instead run sshd.exe -ddd
and try connecting, I get something like the below:
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug2: fd 4 setting O_NONBLOCK
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug3: fd 5 is not O_NONBLOCK
debug1: Server will not fork when running in debugging mode.
debug3: send_rexec_state: entering fd = 8 config len 326
debug3: ssh_msg_send: type 0
debug3: send_rexec_state: done
Connection from xxx.xxx.xxx.xxx port 53595 on xxx.xxx.xxx.xxx port 22
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
debug1: Remote protocol version 2.0, remote software version SecureCRT_8.5.1 (x6
4 build 1764)
debug1: no match: SecureCRT_8.5.1 (x64 build 1764)
debug2: fd 5 setting O_NONBLOCK
debug3: spawning "C:\\Program Files\\OpenSSH\\sshd.exe" -ddd -y
debug2: Network child is on pid 26544
debug3: send_rexec_state: entering fd = 4 config len 326
debug3: ssh_msg_send: type 0
debug3: send_rexec_state: done
debug3: ssh_msg_send: type 0
debug3: ssh_msg_send: type 0
debug3: preauth child monitor started
Then OpenSSH crashes (which apparently is by design?).
And yes, I've checked that I have the right file permissions set, added an inbound rule to the firewall, etc.
I will say that I'm connecting behind a VPN (Cisco AnyConnect), which I imagine makes a difference, I just don't know how to check in what way. Any help is much appreciated.