Subject: maximum size of packets from client to server

From: Thomas Anderson <[email-masked]>
Date: Fri, 11 Sep 2009 10:11:54 -0700 (PDT)

Per RFC4254, the maximum size field of an SSH_MSG_CHANNEL_OPEN packet places an upper bound on just how big a packet from the server to the client can be:

   The maximum size of a packet is in practice determined by the  client 
   (the maximum size of read or write requests that it sends, plus a  few 
   bytes of packet overhead).  All servers SHOULD support packets of  at 
   least 34000 bytes (where the packet size refers to the full length, 
   including the header above).  This should allow for reads and  writes 
   of at most 32768 bytes.

My question is...  what about the other way around?  What about packets sent from the client to the server?

If I upload a 1mb file via PuTTY's PSFTP, the SSH_MSG_CHANNEL_DATA packets have a data length of 512 bytes.  Why not 34000 bytes?  Why not 1mb?  The fact that PuTTY has a server->client max size of 16,384 bytes makes the client->server max size of 512 seem odd...

---

From: der Mouse <[email-masked]>
Date: Sat, 12 Sep 2009 18:18:44 -0400 (EDT)

> Per RFC4254, the maximum size field of an SSH_MSG_CHANNEL_OPEN packet
> places an upper bound on just how big a packet from the server to the
> client can be: [...]

> My question is...  what about the other way around?  What about
> packets sent from the client to the server?

See the SSH_MSG_CHANNEL_OPEN_CONFIRMATION packet sent in response to
the open request, which holds the corresponding values for data flowing
in the other direction.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		[email-masked]
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B