Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
7k views
in Java FTP by (160 points)
Hi,
I've got a simple Java program that sends files to several different sftp servers, but one of the servers always fails with this error:

=====
DEBUG [TransportProtocolCommon] 23 Feb 2011 17:07:35.810 : Determine Algorithm
DEBUG [TransportProtocolCommon] 23 Feb 2011 17:07:35.810 : Client Algorithms: [hmac-sha1, hmac-md5-96, hmac-md5, hmac-sha1-96]
DEBUG [TransportProtocolCommon] 23 Feb 2011 17:07:35.810 : Server Algorithms: [hmac-sha1, hmac-md5, sha1-8, md5-8, sha1, none]
DEBUG [TransportProtocolCommon] 23 Feb 2011 17:07:35.810 : Returning hmac-sha1
DEBUG [TransportProtocolCommon] 23 Feb 2011 17:07:35.810 : Determine Algorithm
DEBUG [TransportProtocolCommon] 23 Feb 2011 17:07:35.810 : Client Algorithms: [none, zlib]
DEBUG [TransportProtocolCommon] 23 Feb 2011 17:07:35.810 : Server Algorithms: [none, zlib]
DEBUG [TransportProtocolCommon] 23 Feb 2011 17:07:35.810 : Returning none
DEBUG [TransportProtocolCommon] 23 Feb 2011 17:07:35.810 : Determine Algorithm
DEBUG [TransportProtocolCommon] 23 Feb 2011 17:07:35.810 : Client Algorithms: [none, zlib]
DEBUG [TransportProtocolCommon] 23 Feb 2011 17:07:35.810 : Server Algorithms: [none, zlib]
DEBUG [TransportProtocolCommon] 23 Feb 2011 17:07:35.810 : Returning none
DEBUG [TransportProtocolCommon] 23 Feb 2011 17:07:35.810 : Sending queued messages
DEBUG [TransportProtocolCommon] 23 Feb 2011 17:07:35.810 : Sending SSH_MSG_SERVICE_REQUEST
ERROR [TransportProtocolCommon] 23 Feb 2011 17:07:35.904 : The Transport Protocol thread failed : Corrupt Mac on input
java.io.IOException: Corrupt Mac on input
at com.enterprisedt.net.j2ssh.transport.A.B(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.processMessages(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(Unknown Source)
at com.enterprisedt.net.j2ssh.transport
java.io.IOException: Corrupt Mac on input
at com.enterprisedt.net.j2ssh.transport.A.B(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.processMessages(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.run(Unknown Source)
at java.lang.Thread.run(Thread.java:736)
=====
I am able to connect to the server and upload files manually using Ipswitch WS_FTP 12
Any suggestions would be appreciated.
Thanks,
Colin

3 Answers

0 votes
by (162k points)
Sorry, only just saw this post for some reason. If you are a current customer, email us at support at enterprisedt dot com for prompt replies. The forums are primarily for free support, and while we monitor them, posts can get missed.

Please email us a full log file at the ALL level.
0 votes
by (162k points)
It seems that the server is running F-SECURE, and that this version has a HMAC bug. When I connect with Filezilla, it logs this message:

"We believe remote version has SSH2 HMAC bug"

The simplest solution is to disable HMAC-SHA1 to force edtFTPj/PRO to use a different MAC algorithm:

ftp.setAlgorithmEnabled(SSHFTPAlgorithm.MAC_SHA1, false);

I've tried this and it succeeds.
0 votes
by (160 points)
Thanks again for isolating this problem for me. I have implemented your solution and it is now working.

Categories

...