v7.7p1 - SFTP Connection closed on Windows Server 2012 R2
"OpenSSH for Windows" version OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.4
Server OperatingSystem Windows 2012 64 Bit
Client Centos 7.2
What is failing SFTP to the Windows server
Expected output $ sftp [email protected] [email protected]'s password: Connected to 10.XX.XX.XX. sftp>
Actual output sftp [email protected] [email protected]'s password: Connection closed
The space issue in the installed directory doesn't seem to apply in this case. My installation directory is C:\OpenSSH-Win64
It's working fine with my 2008 Windows server
sftp-server.exe is crashing. You need sftp-server.log to debug this further. For sftp-server.log, refer to this
7620 2020-05-05 08:26:23.249 debug3: spawning "c:\windows\system32\cmd.exe" /c "sftp-server.exe" 7620 2020-05-05 08:26:23.265 debug2: fd 4 setting TCP_NODELAY 7620 2020-05-05 08:26:23.265 debug3: fd 11 is O_NONBLOCK 7620 2020-05-05 08:26:23.265 debug3: fd 10 is O_NONBLOCK 7620 2020-05-05 08:26:23.265 debug3: fd 13 is O_NONBLOCK 7620 2020-05-05 08:26:23.265 debug3: send packet: type 99 7620 2020-05-05 08:26:23.296 debug2: channel 0: read 106 from efd 13 7620 2020-05-05 08:26:23.296 debug3: channel 0: discard efd 7620 2020-05-05 08:26:23.296 debug2: channel 0: read<=0 rfd 11 len 0 7620 2020-05-05 08:26:23.296 debug2: channel 0: read failed 7620 2020-05-05 08:26:23.296 debug2: channel 0: chan_shutdown_read (i0 o0 sock -1 wfd 11 efd 13 [ignore]) 7620 2020-05-05 08:26:23.296 debug2: channel 0: input open -> drain 7620 2020-05-05 08:26:23.296 debug2: channel 0: ibuf empty 7620 2020-05-05 08:26:23.296 debug2: channel 0: send eof 7620 2020-05-05 08:26:23.296 debug3: send packet: type 96 7620 2020-05-05 08:26:23.296 debug2: channel 0: input drain -> closed 7620 2020-05-05 08:26:23.296 debug1: Received SIGCHLD.
sftp-server.exe is crashing. You need sftp-server.log to debug this further. For sftp-server.log, refer to this
Thank you for pointing to that link.
I modified sshd_config to this
Subsystem sftp sftp-server.exe -f LOCAL0
Restarted the sshd server, but it won't generate the sftp logs. Will they appear as separate file or included in the same sshd.log ? I can't locate any new logs
Edit:
- Forgot to mention that I don't have any firewalls running. It's a test only system and I am completely open on making any changes necessary to debug this
- My windows 2008 and 2016 are running fine with the same installation
I have one query though, after installing sshd with the install-sshd.ps1 powershell script, though 'Open SSH serverappears under services, thesshutilities are not available directly from command line. Do I need to add that folder path toPATH` system variable ?
It's a separate log file sftp-server.log. It's in same folder ($env:programdata\ssh\logs) as sshd.log.
Please have the below config in the sshd_config Subsystem sftp sftp-server.exe -f LOCAL0 -l DEBUG3
Restart the sshd service. Now try sftp.exe
Regarding your query of ssh utilities not in PATH. it's expected. You need to make this change manually.
Please have the below config in the sshd_config Subsystem sftp sftp-server.exe -f LOCAL0 -l DEBUG3
Restart the sshd service. Now try sftp.exe
No luck !! Still no log file and same behavior
Ok !! So I uninstalled 64 Bit version and installed 32 Bit instead. That was working fine.
The uninstalled 32 and re-installed 64 bit again.
And now that seems to be working too
Not sure what was the reason earlier. I tried install/uninstall multiple times
I uninstalled the laster version and install 1.0.0 verison, that was working fine too
我遇到的问题是 win ssh 安装版,安装到 C:\Program Files\OpenSSH 下面,也是出现这个问题,发现是没有添加到环境变量。

我遇到的问题是 win ssh 安装版,安装到 C:\Program Files\OpenSSH 下面,也是出现这个问题,发现是没有添加到环境变量。
This fixed the problem for me, thank you