我正在将两台 Windows Server 2008 R2 服务器移动到两台新的 Windows Server 2012 Standard 服务器。
从这些服务器我们需要连接到两个不同的 SFTP 服务器来上传文件。
我可以按预期连接到其中一个 SFTP 服务器。另一个则不行。我已与该服务器的所有者联系,他们表示没有限制(即特定的传入 IP 地址)。我已通过从另外 2 台 Windows 10 计算机连接到相关服务器来验证这一点。
我关闭了防火墙,以确保它没有阻止任何流量。结果相同。
以下是尝试连接的日志:
. 2018-11-16 12:48:01.467 Looking up host "Copaftp.state.pa.us" for SSH connection
. 2018-11-16 12:48:01.467 Connecting to 164.156.185.23 port 22
. 2018-11-16 12:48:01.514 Selecting events 63 for socket 1360
. 2018-11-16 12:48:01.514 We claim version: SSH-2.0-WinSCP_release_5.13.4
. 2018-11-16 12:48:01.545 Waiting for the server to continue with the initialization
. 2018-11-16 12:48:01.545 Looking for incoming data
. 2018-11-16 12:48:01.545 Looking for network events
. 2018-11-16 12:48:01.545 Detected network event
. 2018-11-16 12:48:01.545 Enumerating network events for socket 1360
. 2018-11-16 12:48:01.545 Enumerated 18 network events making 18 cumulative events for socket 1360
. 2018-11-16 12:48:01.545 Handling network write event on socket 1360 with error 0
. 2018-11-16 12:48:01.545 Handling network connect event on socket 1360 with error 0
. 2018-11-16 12:48:01.545 Looking for network events
. 2018-11-16 12:48:01.561 Detected network event
. 2018-11-16 12:48:01.561 Enumerating network events for socket 1360
. 2018-11-16 12:48:01.561 Enumerated 32 network events making 32 cumulative events for socket 1360
. 2018-11-16 12:48:01.561 Handling network close event on socket 1360 with error 0
. 2018-11-16 12:48:01.561 Selecting events 0 for socket 1360
. 2018-11-16 12:48:01.561 Server unexpectedly closed network connection
. 2018-11-16 12:48:01.561 Knocking FTP port.
. 2018-11-16 12:48:01.608 FTP port opened, will suggest using FTP protocol.
* 2018-11-16 12:48:01.623 (EFatal) Server unexpectedly closed network connection.
* 2018-11-16 12:48:01.623 The server rejected SFTP connection, but it listens for FTP connections.
我错过了什么?我可以连接到一个 SFTP 服务器而不能连接到这个,这毫无道理。(这两个连接之间的配置的唯一区别是主机名和凭据。)但是我可以从其他系统毫无问题地连接到有问题的 SFTP 服务器。
这是 Windows Server 2012 网络堆栈的问题吗?顺便说一句,我在两台新服务器上都得到了相同的结果。