Hello.

We are using JSch library version 0.1.49 and we have a problem that the illegal 
data will get mixed into a file we sent.

If we add the following configuration to Sftp.java, which is one of the 
examples included with jsch-0.1.49.zip, and send a file to the SFTP Server 
(Titan FTP server), then the result shows the file size is the same between the 
sent file and the received one, but we can find the contents of the two files 
are different if we compare the hash values retrieved from them.
  JSch.setConfig("mac.c2s", "hmac-sha2-256");
  JSch.setConfig("mac.s2c", "hmac-sha2-256");

This problem always happens when we sent a file which size is more than 35840 
bytes. And we look into the received file, we found the data such as a header 
information "SSH_MSG_CHANNEL_DATA" always got mixed in with the file at every 
position of 35709 bytes (i.e. a size of data which JSch can send to the Titan 
SFTP Server in one time), we think this will cause the difference of the 
contents with the two files.

And it seems that the following values have been set to 
"SSH_MSG_CHANNEL_OPEN_CONFIRMATION" from the SFTP Server:
  initial window size:16384
  maximum packet size:35840


We found the same problem would occur with JSch-0.1.53, do you think this 
problem occurs due to a defect specific to JSch? And in that case, can you fix 
the defect with JSch version 0.1.49?



------------------------------------------------------------------------------
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to