Size of data packets in SSH connection

Damien Miller djm at
Wed Apr 14 06:44:54 EST 2010

On Tue, 13 Apr 2010, david kohn7 wrote:

> Hello,
> During an interactive connection (i.e past the login), is it true that all
> data packets (i.e data size of the packet excluding the TCP/IP headers)
> must be a multiple of 4? or it can it be odd? If so , will the other end
> hang up?

No, the TCP packets can be any size. The SSH packets that they carry
must be sized correctly and this depends on the cipher in use. See
cipher.c in the OpenSSH source for the list of blocksizes.

> Can it change during the connection?

If the connection is rekeyed, yes.

> Is it also true for non interactive connections such as scp,sftp ?

It is a depends on the cipher used, not the interactivity of the


More information about the openssh-unix-dev mailing list