module documentation
(source)

The lowest level SSH protocol. This handles the key negotiation, the encryption and the compression. The transport layer is described in RFC 4253.

Maintainer: Paul Swartz

Class ​SSHCiphers SSHCiphers represents all the encryption operations that need to occur to encrypt and authenticate the SSH connection.
Class ​SSHClient​Transport SSHClientTransport implements the client side of the SSH protocol.
Class ​SSHServer​Transport SSHServerTransport implements the server side of the SSH protocol.
Class ​SSHTransport​Base Protocol supporting basic SSH functionality: sending/receiving packets and message dispatch. To connect to or run a server, you must use SSHClientTransport or SSHServerTransport.
Constant DH​_GENERATOR Undocumented
Constant DH​_PRIME Undocumented
Constant DISCONNECT​_AUTH​_CANCELLED​_BY​_USER Undocumented
Constant DISCONNECT​_BY​_APPLICATION Undocumented
Constant DISCONNECT​_COMPRESSION​_ERROR Undocumented
Constant DISCONNECT​_CONNECTION​_LOST Undocumented
Constant DISCONNECT​_HOST​_KEY​_NOT​_VERIFIABLE Undocumented
Constant DISCONNECT​_HOST​_NOT​_ALLOWED​_TO​_CONNECT Undocumented
Constant DISCONNECT​_ILLEGAL​_USER​_NAME Undocumented
Constant DISCONNECT​_KEY​_EXCHANGE​_FAILED Undocumented
Constant DISCONNECT​_MAC​_ERROR Undocumented
Constant DISCONNECT​_NO​_MORE​_AUTH​_METHODS​_AVAILABLE Undocumented
Constant DISCONNECT​_PROTOCOL​_ERROR Undocumented
Constant DISCONNECT​_PROTOCOL​_VERSION​_NOT​_SUPPORTED Undocumented
Constant DISCONNECT​_RESERVED Undocumented
Constant DISCONNECT​_SERVICE​_NOT​_AVAILABLE Undocumented
Constant DISCONNECT​_TOO​_MANY​_CONNECTIONS Undocumented
Constant MSG​_DEBUG Undocumented
Constant MSG​_DISCONNECT Undocumented
Constant MSG​_IGNORE Undocumented
Constant MSG​_KEX​_DH​_GEX​_GROUP Undocumented
Constant MSG​_KEX​_DH​_GEX​_INIT Undocumented
Constant MSG​_KEX​_DH​_GEX​_REPLY Undocumented
Constant MSG​_KEX​_DH​_GEX​_REQUEST Undocumented
Constant MSG​_KEX​_DH​_GEX​_REQUEST​_OLD Undocumented
Constant MSG​_KEXDH​_INIT Undocumented
Constant MSG​_KEXDH​_REPLY Undocumented
Constant MSG​_KEXINIT Undocumented
Constant MSG​_NEWKEYS Undocumented
Constant MSG​_SERVICE​_ACCEPT Undocumented
Constant MSG​_SERVICE​_REQUEST Undocumented
Constant MSG​_UNIMPLEMENTED Undocumented
Variable messages Undocumented
Class _​Dummy​Algorithm An encryption algorithm that does not actually encrypt anything.
Class _​Dummy​Cipher A cipher for the none encryption method.
Class _​MACParams _MACParams represents the parameters necessary to compute SSH MAC (Message Authenticate Codes).
Class _​Null​Encryption​Context An encryption context that does not actually encrypt anything.
Function _get​Supported​Ciphers Build a list of ciphers that are supported by the backend in use.
Function _mp​From​Bytes Make an SSH multiple-precision integer from big-endian bytes.
DH_GENERATOR = (source)

Undocumented

DH_PRIME = (source)

Undocumented

DISCONNECT_AUTH_CANCELLED_BY_USER: int = (source)

Undocumented

Value
13
DISCONNECT_BY_APPLICATION: int = (source)

Undocumented

Value
11
DISCONNECT_COMPRESSION_ERROR: int = (source)

Undocumented

Value
6
DISCONNECT_CONNECTION_LOST: int = (source)

Undocumented

Value
10
DISCONNECT_HOST_KEY_NOT_VERIFIABLE: int = (source)

Undocumented

Value
9
DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT: int = (source)

Undocumented

Value
1
DISCONNECT_ILLEGAL_USER_NAME: int = (source)

Undocumented

Value
15
DISCONNECT_KEY_EXCHANGE_FAILED: int = (source)

Undocumented

Value
3
DISCONNECT_MAC_ERROR: int = (source)

Undocumented

Value
5
DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE: int = (source)

Undocumented

Value
14
DISCONNECT_PROTOCOL_ERROR: int = (source)

Undocumented

Value
2
DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED: int = (source)

Undocumented

Value
8
DISCONNECT_RESERVED: int = (source)

Undocumented

Value
4
DISCONNECT_SERVICE_NOT_AVAILABLE: int = (source)

Undocumented

Value
7
DISCONNECT_TOO_MANY_CONNECTIONS: int = (source)

Undocumented

Value
12
MSG_DEBUG: int = (source)

Undocumented

Value
4
MSG_DISCONNECT: int = (source)

Undocumented

Value
1
MSG_IGNORE: int = (source)

Undocumented

Value
2
MSG_KEX_DH_GEX_GROUP: int = (source)

Undocumented

Value
31
MSG_KEX_DH_GEX_INIT: int = (source)

Undocumented

Value
32
MSG_KEX_DH_GEX_REPLY: int = (source)

Undocumented

Value
33
MSG_KEX_DH_GEX_REQUEST: int = (source)

Undocumented

Value
34
MSG_KEX_DH_GEX_REQUEST_OLD: int = (source)

Undocumented

Value
30
MSG_KEXDH_INIT: int = (source)

Undocumented

Value
30
MSG_KEXDH_REPLY: int = (source)

Undocumented

Value
31
MSG_KEXINIT: int = (source)

Undocumented

Value
20
MSG_NEWKEYS: int = (source)

Undocumented

Value
21
MSG_SERVICE_ACCEPT: int = (source)

Undocumented

Value
6
MSG_SERVICE_REQUEST: int = (source)

Undocumented

Value
5
MSG_UNIMPLEMENTED: int = (source)

Undocumented

Value
3
messages: dict = (source)

Undocumented

def _getSupportedCiphers(): (source)
Build a list of ciphers that are supported by the backend in use.
Returns
list of stra list of supported ciphers.
def _mpFromBytes(data): (source)

Make an SSH multiple-precision integer from big-endian bytes.

Used in ECDH key exchange.

Parameters
data:bytesThe input data, interpreted as a big-endian octet string.
Returns
bytesThe given data encoded as an SSH multiple-precision integer.