Conceptually the SSH protocol can be partitioned into four layers:
The SSH Transport Protocol is a secure, low level transport.
It provides strong encryption, cryptographic host
authentication and integrity protection. Currently, only a
minimum of MAC- (message authentication code, a short piece of
information used to authenticate a message) and encryption
algorithms are supported see
The SSH authentication protocol is a general-purpose user
authentication protocol run over the SSH transport
protocol. Erlang SSH supports user authentication using public
key technology (RSA and DSA, X509-certificates are currently not
supported). It is also possible to use a so called keyboard
interactive authentication. This method is suitable for
interactive authentication methods that do not need any special
software support on the client side. Instead, all authentication
data should be entered via the keyboard. It is also possible
to use a pure password based authentication scheme, note that in
this case the the plain text password will be encrypted before sent
over the network. There are several configuration options for
authentication handling available in
The SSH Connection Protocol provides application-support
services over the transport pipe, such as channel multiplexing,
flow control, remote program execution, signal propagation,
connection forwarding, etc. Functions for handling the SSH
Connection Protocol can be found in the module
All terminal sessions, forwarded connections etc., are
channels. Multiple channels are multiplexed into a single
connection, and all channels are flow-controlled. Typically an
SSH client will open a channel, send data/commands, receive
data/"control information" and when it is done close the
channel. The
Channels comes in three flavors
Channels are flow controlled. No data may be sent to a channel peer until a message is received to indicate that window space is available. The 'initial window size' specifies how many bytes of channel data that can be sent to the channel peer without adjusting the window.
For more detailed information about the SSH protocol, see the following RFCs: