From: Henrik Nordström <>
Date: Sat, 19 Nov 2011 03:18:43 +0100

lör 2011-11-19 klockan 08:03 +0800 skrev Michael Harris:

> If you are referring to the section I quoted when I started this
> thread (Section 4 - General Packet Format) - that only states that a
> server SHOULD accept at least 34000 bytes. It says nothing about the
> minimum a client should accept or the maximum a server can send.

It do say some.. see 11. Implementation Considerations

but yes, this is only a recommendation and not a requirement. There may
be SFTP messages larger than the channel packet size.

> This is true for normal reads and writes because the client specifies
> how many bytes are being written and read. Not true for directory
> reads where it is completely up to the server.

Indeed. READDIR is unbound and it's the servers responsibility to split
it up in manageable chunks as it sees fit.

It would however be impolite to exceed the transport packet size, and
rude to exceed the servers advertised max-read-size + headers (or 34000
if not advertised).


Received on 2011-11-19