pubdev/dartssh/protocol library

Classes

BinaryPacket
SSH protocol frame.
MSG_CHANNEL_CLOSE
When either party wishes to terminate the channel, it sends SSH_MSG_CHANNEL_CLOSE. https://tools.ietf.org/html/rfc4254#section-5.3
MSG_CHANNEL_DATA
https://tools.ietf.org/html/rfc4254#section-5.2
MSG_CHANNEL_EOF
When a party will no longer send more data to a channel, it SHOULD send SSH_MSG_CHANNEL_EOF.
MSG_CHANNEL_FAILURE
These messages do not consume window space and can be sent even if no window space is available.
MSG_CHANNEL_OPEN
https://tools.ietf.org/html/rfc4254#section-5.1
MSG_CHANNEL_OPEN_CONFIRMATION
The remote side then decides whether it can open the channel, and responds with either SSH_MSG_CHANNEL_OPEN_CONFIRMATION or SSH_MSG_CHANNEL_OPEN_FAILURE.
MSG_CHANNEL_OPEN_FAILURE
The client MAY show the 'description' string to the user.
MSG_CHANNEL_OPEN_TCPIP
https://tools.ietf.org/html/rfc4254#section-7.2
MSG_CHANNEL_REQUEST
Channel-Specific Requests https://tools.ietf.org/html/rfc4254#section-5.4
MSG_CHANNEL_SUCCESS
If 'want reply' is FALSE, no response will be sent to the request. Otherwise, the recipient responds with either SSH_MSG_CHANNEL_SUCCESS, or SSH_MSG_CHANNEL_FAILURE.
MSG_CHANNEL_WINDOW_ADJUST
The window size specifies how many bytes the other party can send before it must wait for the window to be adjusted.
MSG_DEBUG
This message is used to transmit information that may help debugging.
MSG_DISCONNECT
This message causes immediate termination of the connection.
MSG_GLOBAL_REQUEST
https://tools.ietf.org/html/rfc4254#section-4
MSG_GLOBAL_REQUEST_TCPIP
https://tools.ietf.org/html/rfc4254#section-7.1
MSG_IGNORE
All implementations MUST understand (and ignore) this message at any time (after receiving the identification string).
MSG_KEX_DH_GEX_GROUP
S finds a group that best matches the client's request, and sends "p || g" to C.
MSG_KEX_DH_GEX_INIT
C generates a random number x, where 1 < x < (p-1)/2. It computes e = g^x mod p, and sends "e" to S.
MSG_KEX_DH_GEX_REPLY
S generates a random number y, where 0 < y < (p-1)/2, and computes f = g^y mod p. S receives "e". It computes K = e^y mod p, and H.
MSG_KEX_DH_GEX_REQUEST
C sends "min || n || max" to S, indicating the minimal acceptable group size, the preferred size of the group, and the maximal group size in bits the client will accept. https://tools.ietf.org/html/rfc4419
MSG_KEX_ECDH_INIT
Client generates ephemeral key pair. https://tools.ietf.org/html/rfc5656#section-4
MSG_KEX_ECDH_REPLY
Server generates ephemeral key pair, computes shared secret, and generate and signs exchange hash.
MSG_KEXDH_INIT
C generates a random number x (1 < x < q) and computes e = g^x mod p. C sends e to S. https://tools.ietf.org/html/rfc4253#section-8
MSG_KEXDH_REPLY
S generates a random number y (0 < y < q) and computes f = g^y mod p. S receives e. It computes K = e^y mod p and H.
MSG_KEXINIT
Key exchange begins by each side sending the following packet. https://tools.ietf.org/html/rfc4253#section-7.1
MSG_NEWKEYS
Key exchange ends by each side sending an SSH_MSG_NEWKEYS message. This message is sent with the old keys and algorithms. All messages sent after this message MUST use the new keys and algorithms. https://tools.ietf.org/html/rfc4253#section-7.3
MSG_SERVICE_ACCEPT
If the server supports the service (and permits the client to use it), it MUST respond with the following.
MSG_SERVICE_REQUEST
After the key exchange, the client requests a service. The service is identified by a name.
MSG_USERAUTH_FAILURE
If the server rejects the authentication request, it MUST respond with the following: https://tools.ietf.org/html/rfc4252#section-5.1
MSG_USERAUTH_INFO_REQUEST
https://tools.ietf.org/html/rfc4256#section-3.1
MSG_USERAUTH_INFO_RESPONSE
https://tools.ietf.org/html/rfc4256#section-3.4
MSG_USERAUTH_REQUEST
https://tools.ietf.org/html/rfc4252#section-5
MSG_USERAUTH_SUCCESS
When the server accepts authentication, it MUST respond with the following:
SSHMessage
Binary Packet Protocol. https://tools.ietf.org/html/rfc4253#section-6

Functions

deserializeMpInt(SerializableInput? input) BigInt?
mpint: https://www.ietf.org/rfc/rfc4251.txt
deserializeString(SerializableInput? input) String?
string: https://www.ietf.org/rfc/rfc4251.txt
deserializeStringBytes(SerializableInput? input) Uint8List?
string: https://www.ietf.org/rfc/rfc4251.txt
mpIntLength(BigInt? x) int?
mpint: https://www.ietf.org/rfc/rfc4251.txt
nextMultipleOfN(int? input, int? n) int?
Rounds input up to the next nth, if necessary.
randBits(Random? generator, int? n) Uint8List?
Returns at least n random bits.
randBytes(Random? generator, int? n) Uint8List?
Returns n random bytes.
serializeMpInt(SerializableOutput? output, BigInt? x) → void
mpint: https://www.ietf.org/rfc/rfc4251.txt
serializeString(SerializableOutput? output, dynamic x) → void
string: https://www.ietf.org/rfc/rfc4251.txt