Skip to main content

Module ssh

Module ssh 

Source
Expand description

SSH (Secure Shell) protocol layer.

Implements parsing for the SSH Binary Packet Protocol (RFC 4253) and the SSH Version Exchange.

§Binary Packet Format

uint32    packet_length
byte      padding_length
byte[n1]  payload; n1 = packet_length - padding_length - 1
byte[n2]  random padding; n2 = padding_length
byte[m]   mac (Message Authentication Code - MAC); m = mac_length

Re-exports§

pub use builder::SshBuilder;

Modules§

builder
SSH layer builder.
msg_types
SSH message type constants (RFC 4250/4253/4252/4254).

Structs§

SshLayer
SSH protocol layer view into a packet buffer.

Constants§

SSH_BINARY_HEADER_LEN
Minimum SSH binary packet header: 4 (packet_length) + 1 (padding_length).
SSH_PORT
Standard SSH port.

Statics§

SSH_FIELDS
Field names for SSH layer.

Functions§

is_ssh_payload
Check if a TCP payload looks like SSH traffic.