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?

有帮助吗?

解决方案

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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top