Discuss (FTP) and (SFTP, FTPS and SCP), our Java file transfer clients.
no avatar
User

cameroncj

Posts

2

Joined

Fri Feb 25, 2011 4:15 am

Location

Reston, VA

How to eliminate: "Corrupt Mac on input"?

by cameroncj » Fri Feb 25, 2011 4:58 am

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
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: How to eliminate: "Corrupt Mac on input"?

by support2 » Fri Mar 11, 2011 9:45 pm

no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: How to eliminate: "Corrupt Mac on input"?

by support2 » Mon Mar 14, 2011 4:12 pm

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.
no avatar
User

cameroncj

Posts

2

Joined

Fri Feb 25, 2011 4:15 am

Location

Reston, VA

Problem Resolved!

by cameroncj » Thu Mar 24, 2011 12:55 am


Who is online

Users browsing this forum: No registered users and 28 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron