SNCSSH computes the largest possible packet resulting from encoding the maximum possible payload size (32768) with the negotiated algorithms, but rfc4253 requires implementations handle an arbitrary limit of 35000 bytes.

Some versions of ssh exceed the maximum limits as calculated by sncssh resulting in an error message like "2017-09-20 11:22:10 (097) SSHProtocolEngine SYSTEM SEVERE *** ERROR *** [1/] Session failure, closing connection: Corrupt packet received, claims impossible length of 32836 bytes:"

Steps to Reproduce


Trying to connect to an sftp server produces the error message:

com.glide.db.impex.datasource.DataSourceException: Cannot create task: ReadFileTask, SFTPJob is terminated



If not possible to upgrade to one of the latest patches in the Fixed In section, the workaround is to modify the SFTP server configuration to not send packets larger than 30536 bytes. This value leaves the correct margin to avoid the error.

Example below:

Related Problem: PRB1192173

Seen In


Fixed In

Jakarta Patch 9
Kingston Patch 3

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-05-21 11:39:31