Question

Scenario

I am trying to download a big file (> 3 GB) using Apache VFS from an SFTP Server (Proftpd) programatically with Java. Apache VFS internally uses ChannelSftp from JSch.

Environment

  • Ubuntu Linux Server 12.4
  • Profptd 1.3.4a
  • OpenSSH

Problem

After approximately 2 GB of data the session is closed and an IOException is thrown from ChannelSftp.

Solution approaches

  • Using OpenSSH SFTP Server and the Java client the problem does not show up
  • Using sftp client and Proftpd it also works

Questions

Any idea?

Was it helpful?

Solution

jsch.ChannelSftp cannot handle the rekeying approach of Proftpd. This issue affects version 0.1.46. in version 0.1.38 it was supposedly fixed but it seems only for other sftp servers.

To work around the problem just use the Proftpd directive

SFTPRekey none
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top