EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SSH or SFTP connection to the server is closed or hangs during data transfer stage (after successful handshake). What should I do?

"Stop working" can mean that the server doesn't respond or that the server closes connection.

If the server closes connection, you need to implement an event handler for OnError event of the client component. Then, if the closed connection was accompanied by SSH error message from the server, you get the information what caused the problem.

If the connection is closed silently (without any error message), this can happen due to inactivity (some servers close connection after certain period of user inactivity). Sending keep-alive packets using SendKeepAlive() method should prevent this. Some buggy servers including FreeSSHd tend to "sleep" sometimes and not send the data. Try SendKeepAlive() method on them too.

The most common sources of the problem during SFTP connection are:
1) pipelining (sending multiple SSH packets at once) which is not handled properly by many servers. SecureBlackbox disables pipelining for servers known to be buggy, but we can't test all versions of all servers (and each server has different set of standard compliance problems in each of it's versions). To disable pipelining by hand set AutoAdjustTransferBlock property to false and PipeLineLength property to 1.
2) Invalid path specified for the operation. First of all, you must ensure that the path is absolute. On Unix / Linux and on most Windows servers this means that the path must start with / (slash). Example: /path/to/filename.ext . Also, the path must exist. Neither SecureBlackbox nor the server create the path for you. If the path doesn't exist, you need to create it.
3) Some servers incorrectly implement file transfer, when negotiated SFTP version is higher than SFTP 3. Try setting Versions property of the SFTP client to SFTP3 (numeric value 8).

Return to the list


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!