Table of Contents

Property ChannelMaxPacketSize

Namespace
SshSharp
Assembly
SshSharp.dll

ChannelMaxPacketSize

The most data the server may put in one packet on a channel (RFC 4254 section 5.1). Larger packets mean fewer of them, and less work per byte, for bulk transfers. It applies to every channel, as ChannelWindowSize does, and is capped at it. Default 32 KiB, as OpenSSH. Between 1 KiB and 255 KiB: SshSharp accepts packets of up to 256 KiB, as OpenSSH does, and the rest is room for the packet's header, padding and MAC. What the client sends is limited by what the server asks for, not by this.

public int ChannelMaxPacketSize { get; init; }

Property Value

int

Exceptions

ArgumentOutOfRangeException

The value is below 1 KiB or above 255 KiB.