The SSH Connection Protocol is used by clients and servers,
that is, SSH channels, to communicate over the SSH connection. The
API functions in this module send SSH Connection Protocol events,
which are received as messages by the remote channel.
If the receiving channel is an Erlang process, the
messages have the format
Type definitions that are used more than once in this module, or abstractions to indicate the intended use of the data type, or both:
list of ASCII characters
opaque() -as returned by
Data has arrived on the channel. This event is sent as a
result of calling
Indicates that the other side sends no more data.
This event is sent as a result of calling
A signal can be delivered to the remote process/service using the following message. Some systems do not support signals, in which case they are to ignore this message. There is currently no function to generate this event as the signals referred to are on OS-level and not something generated by an Erlang program.
A remote execution can terminate violently because of a signal.
Then this message can be received. For details on valid string
values, see
When the command running at the other end terminates, the
following message can be sent to return the exit status of the
command. A zero
This event is sent as a result of calling
Channels implementing a shell and command execution on the server side are to handle the following messages that can be sent by client- channel processes.
Events that include a
Environment variables can be passed to the shell/command
to be started later. This event is sent as a result of calling
A pseudo-terminal has been requested for the
session.
This message requests that the user default shell
is started at the other end. This event is sent as a result of calling
When the window (terminal) size changes on the client side, it can send a message to the server side to inform it of the new dimensions. No API function generates this event.
This message requests that the server starts
execution of the given command. This event is sent as a result of calling
Adjusts the SSH flow control window. This is to be done by both the 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 is called by the
Is to be called by a client-channel process to request that the server starts
executing the given command. The result is several messages according to the
following pattern. The last message is a channel close message, as the
The result of executing the command can be only one line or thousands of lines depending on the command.
Indicates that no more data is to be sent.
Not all systems send signals. For details on valid string values, see RFC 4254, Section 6.10
It is recommended by the SSH Connection Protocol to send this message, but that is not always the case.
Indicates that the
Is to be called by a server-channel process to send the exit status of a command to the client.
Sends an SSH Connection Protocol
Options:
Defaults to os:getenv("TERM") or vt100 if it is undefined.
Defaults to 80 if
Defaults to 24 if
Is disregarded if
Is disregarded if
Option can be an empty list. Otherwise, see possible POSIX names
in Section 8 in
Sends status replies to requests where the requester has
stated that it wants a status report, that is,
Is to be called by client- and server-channel processes to send data to each other.
Sends EOF on channel
Opens a channel for an SSH session. The channel id returned from this function is the id used as input to the other functions in this module.
Environment variables can be passed before starting the shell/command. Is to be called by a client channel processes.
Is to be called by a client channel process to request that the user default shell (typically defined in /etc/passwd in Unix systems) is executed at the server end.
Is to be called by a client-channel process for requesting to execute a predefined subsystem on the server.