Linux sftp client error 6: invalid packet (solution)

Some users of Server! have reported that when trying to connect to Server! using the command-line sftp client from certain (but not all) Linux versions they are suddenly disconnected with the error message shown in the picture here below:


The error code 6 (invalid packet) signifies that the Linux sftp client was not able to negotiate a secure session with the server due to the (client) inability to verify the contents of the KEX packet coming from the server.

This happens because, even though the HMAC-MD5 has been deprecated (MD5 is, in fact, now considered a weak algorithm) some versions of the OpenSSH client software installed by some versions of Linux still require it, and use it during KEX regardless of the chosen session HMAC.

Therefore, in order to address this odd behavior, you have to enable the HMAC-MD5 on Server!, as shown in the picture here below:


Once MD5 has been enabled, your Linux sftp client will be able to connect to your SFTP server without any issue:


Print Friendly, PDF & Email
Bookmark the permalink.

Comments are closed.