Am 12.04.2019 um 08:42 schrieb Sensen, Andreas:

     ChannelExec channel = (ChannelExec) session.openChannel("exec");

     …

that part would be interesting as well in order to give an answer.

     InputStream sshInputStream = channel.getInputStream();

Aftersending a "scp -f filename" the scp-command starts with an information
about the lenght of the file to be transfered. You should read that and keep
that information for the next step.

Here you should wrap the returned inputstream into an own InputStream
that uses the above size-information to return -1 as soon as the announced
number of bytes has been reached.


Cheers, Lothar


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

Reply via email to