The SSH Connection Protocol is used by clients and servers
(i.e. SSH channels) to communicate over the SSH connection. The
API functions in this module sends SSH Connection Protocol events
that are received as messages by the remote channel.
In the case that the receiving channel is an Erlang process the
message will be on the following format
Type definitions that are used more than once in this module and/or abstractions to indicate the intended use of the data type:
Channels implementing a shell and command execution on the server side should handle the following messages that may be sent by client channel processes.
Adjusts the SSH flowcontrol window. This shall be done by both client and server side channel processes.
Channels implemented with the
A server or client channel process can choose to close their session by sending a close event.
This function will be called by the ssh_channel
behavior when the channel is terminated see
Should be called by a client channel process to request that the server starts execution of the given command, the result will be several messages according to the following pattern. Note that the last message will be a channel close message, as the exec request is a one time execution that closes the channel when it is done.
Should be called by a server channel process to sends the exit status of a command to the client.
Sends status replies to requests where the requester has
stated that they want a status report e.i .
Should be called by client- and server channel processes to send data to each other.
Sends eof on the channel
Opens a channel for an SSH session. The channel id returned from this function is the id used as input to the other funtions in this module.
Environment variables may be passed before starting the shell/command. Should be called by a client channel processes.
Should be called by a client channel process to request that the user's default shell (typically defined in /etc/passwd in UNIX systems) shall be executed at the server end.
Should be called by a client channel process for requesting to execute a predefined subsystem on the server.