Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: SFTP connection error - Server unexpectedly closed network connection

What does the server-side log say? Also have your network team check your firewalls.
christine_he

SFTP connection error - Server unexpectedly closed network connection

Hi there,

I encountered an intermittent error when trying to connect to a client's SFTP server using WinSCP .NET dll. It works for some of the time but failed for most of the cases. Our client said no changes made on their FTP server side. I also updated WinSCP dll to the latest version 5.19.1 but still got the same error. Could you please kindly advise? Any reply is greatly appreciated!
. 2021-07-08 16:41:08.198 --------------------------------------------------------------------------
< 2021-07-08 16:41:08.198 Script: Searching for host...
. 2021-07-08 16:41:08.199 Looking up host "xxxx.com" for SSH connection
. 2021-07-08 16:41:08.213 Connecting to xxx.xxx.xxx.xxx port 22
< 2021-07-08 16:41:08.277 Script: Connecting to host...
. 2021-07-08 16:41:08.277 We claim version: SSH-2.0-WinSCP_release_5.19.1
. 2021-07-08 16:41:08.340 Remote side unexpectedly closed network connection
. 2021-07-08 16:41:08.340 Knocking FTP port.
. 2021-07-08 16:41:08.408 FTP port opened, will suggest using FTP protocol.
< 2021-07-08 16:41:08.409 Script: Server unexpectedly closed network connection.
< 2021-07-08 16:41:08.409 The server rejected SFTP connection, but it listens for FTP connections.
< 2021-07-08 16:41:08.409 Did you want to use FTP protocol instead of SFTP? Prefer using encryption.