0 votes
by (120 points)

The exception occurred only at the time of .net framework upgrade. Earlier, the framework was 4.6.1, and now it is 4.8.

It is working perfectly fine in the older version of the.net framework. The error is not a blocker, means it is not blocking the entire functionality. it troughing below exceptions frequently.

****The connection was closed by the server. Make sure you are connecting to an SSH or SFTP server****

It is taking more than 2 hours to download a single file; it seems not at all productive.

It is SSH enabled, key based authentication in the SFTP server.

1 Answer

0 votes
by (147k points)

The "The connection was closed by the server. Make sure you are connecting to an SSH or SFTP server" error occurs when the SFTP/SSH server closes the connection instead of starting SSH protocol negotiation. This is almost always caused by connectivity issues somewhere between the client and the server, and it is very unlikely to be caused by an upgrade from .NET Framework 4.6.1 to 4.8. A network protocol analyzer such as Wireshark at the client side can be used to determine whether this is a networking issue or application issue.

As for taking more than 2 hours to download a single file - did transfer speed got suddenly slower, or is most of that time spent trying to establish a connection while getting lots of "connection was closed by the server" errors?

by (120 points)
Most of the time this error occurred.
it is able to connect to the SFTP server using SSH by using the older version of .net framework 4.6.0 and Rebex 2.5.

Now the .net framework upgraded to 4.8 and Rebex to 5.0. This is the only change we have made, getting the error most frequently.
by (147k points)
Can you reproduce this when connecting to (and downloading from) the test server at test.rebex.net? See https://test.rebex.net/ for credentials.
...