When investigating why SFTP file transfers (get) from a particular server
(5.0.3.13 SSH Tectia Server) are very slow I found that the server responds
with a remote package size of only 4096 bytes in
the SSH_MSG_CHANNEL_OPEN_CONFIRMATION message (remote window size: 65536).
The remote packet size is then used in ChannelSftp.read() as the size of
packets requested with SSH_FXP_READ.
When I run the openssh sftp command line client (OpenSSH_3.9p1) with debug
flag (-vvv) it doesn't seem to honor the remote max packet size, it requests
packets of size 32768, and thus have a much better download performance.
My question is: must a client honor the remote package size?
I tried overriding setRemotePacketSize in ChannelSftp like:
void setRemotePacketSize(int remoteMaxPacketSize) {
int sftpSpecificationMaxPacketSize = 32768;
this.rmpsize = sftpSpecificationMaxPacketSize;
}
and it seems to work fine for getting files in this case - I'm however
uncertain if it's an acceptable solution in the general case.
Cheers,
/Håkan
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users