Part of twisted.conch.ssh.transport View Source View In Hierarchy
Known subclasses: twisted.conch.ssh.transport.SSHClientTransport, twisted.conch.ssh.transport.SSHServerTransport
Instance Variables | protocolVersion | A string representing the version of the SSH protocol we support. Currently defaults to '2.0'. |
version | A string representing the version of the server or client. Currently defaults to 'Twisted'. | |
comment | An optional string giving more information about the server or client. | |
supportedCiphers | A list of strings representing the encryption algorithms supported, in order from most-preferred to least. | |
supportedMACs | A list of strings representing the message authentication codes (hashes) supported, in order from most-preferred to least. Both this and supportedCiphers can include 'none' to use no encryption or authentication, but that must be done manually, | |
supportedKeyExchanges | A list of strings representing the key exchanges supported, in order from most-preferred to least. | |
supportedPublicKeys | A list of strings representing the public key types supported, in order from most-preferred to least. | |
supportedCompressions | A list of strings representing compression types supported, from most-preferred to least. | |
supportedLanguages | A list of strings representing languages supported, from most-preferred to least. | |
isClient | A boolean indicating whether this is a client or server. | |
gotVersion | A boolean indicating whether we have receieved the version string from the other side. | |
buf | Data we've received but hasn't been parsed into a packet. | |
outgoingPacketSequence | the sequence number of the next packet we will send. | |
incomingPacketSequence | the sequence number of the next packet we are expecting from the other side. | |
outgoingCompression | an object supporting the .compress(str) and .flush() methods, or None if there is no outgoing compression. Used to compress outgoing data. | |
outgoingCompressionType | A string representing the outgoing compression type. | |
incomingCompression | an object supporting the .decompress(str) method, or None if there is no incoming compression. Used to decompress incoming data. | |
incomingCompressionType | A string representing the incoming compression type. | |
ourVersionString | the version string that we sent to the other side. Used in the key exchange. | |
otherVersionString | the version string sent by the other side. Used in the key exchange. | |
ourKexInitPayload | the MSG_KEXINIT payload we sent. Used in the key exchange. | |
otherKexInitPayload | the MSG_KEXINIT payload we received. Used in the key exchange | |
sessionID | a string that is unique to this SSH session. Created as part of the key exchange, sessionID is used to generate the various encryption and authentication keys. | |
service | an SSHService instance, or None. If it's set to an object, it's the currently running service. | |
kexAlg | the agreed-upon key exchange algorithm. | |
keyAlg | the agreed-upon public key type for the key exchange. | |
currentEncryptions | an SSHCiphers instance. It represents the current encryption and authentication options for the transport. | |
nextEncryptions | an SSHCiphers instance. Held here until the MSG_NEWKEYS messages are exchanged, when nextEncryptions is transitioned to currentEncryptions. | |
first | the first bytes of the next packet. In order to avoid decrypting data twice, the first bytes are decrypted and stored until the whole packet is available. |
Method | connectionLost | Called when the connection is shut down. |
Method | connectionMade | Called when the connection is made to the other side. We sent our |
Method | sendKexInit | Undocumented |
Method | sendPacket | Sends a packet. If it's been set up, compress the data, encrypt it, |
Method | getPacket | Try to return a decrypted, authenticated, and decompressed packet |
Method | dataReceived | First, check for the version string (SSH-2.0-*). After that has been |
Method | dispatchMessage | Send a received message to the appropriate method. |
Method | ssh_KEXINIT | Called when we receive a MSG_KEXINIT message. Payload: |
Method | ssh_DISCONNECT | Called when we receive a MSG_DISCONNECT message. Payload: |
Method | ssh_IGNORE | Called when we receieve a MSG_IGNORE message. No payload. |
Method | ssh_UNIMPLEMENTED | Called when we receieve a MSG_UNIMPLEMENTED message. Payload: |
Method | ssh_DEBUG | Called when we receieve a MSG_DEBUG message. Payload: |
Method | setService | Set our service to service and start it running. If we were |
Method | sendDebug | Send a debug message to the other side. |
Method | sendIgnore | Send a message that will be ignored by the other side. This is |
Method | sendUnimplemented | Send a message to the other side that the last packet was not |
Method | sendDisconnect | Send a disconnect message to the other side and then disconnect. |
Method | isEncrypted | Return True if the connection is encrypted in the given direction. |
Method | isVerified | Return True if the connecction is verified/authenticated in the |
Method | loseConnection | Lose the connection to the other side, sending a |
Method | receiveError | Called when we receive a disconnect error message from the other |
Method | receiveUnimplemented | Called when we receive an unimplemented packet message from the other |
Method | receiveDebug | Called when we receive a debug message from the other side. |
Method | _getKey | Get one of the keys for authentication/encryption. |
Method | _keySetup | Set up the keys for the connection and sends MSG_NEWKEYS when |
Inherited from BaseProtocol (via Protocol):
Method | makeConnection | Make a connection to a transport and a server. |
Clear any circular references here, and any external references to this Protocol. The connection has been closed.
Parameters | reason | (type: twisted.python.failure.Failure
) |
Parameters | messageType | The type of the packet; generally one of the MSG_* values.
(type: int
) |
payload | The payload for the message.
(type: str
) |
Returns | (type: str /None
) |
Parameters | data | (type: str
) |
Parameters | messageNum | (type: int
) |
payload | (type: c{str} ) |
bytes[16] cookie string keyExchangeAlgorithms string keyAlgorithms string incomingEncryptions string outgoingEncryptions string incomingAuthentications string outgoingAuthentications string incomingCompressions string outgoingCompressions string incomingLanguages string outgoingLanguages bool firstPacketFollows unit32 0 (reserved)
Starts setting up the key exchange, keys, encryptions, and authentications. Extended by ssh_KEXINIT in SSHServerTransport and SSHClientTransport.
long code string description
This means that the other side has disconnected. Pass the message up and disconnect ourselves.
long packet
This means that the other side did not implement one of our packets.
bool alwaysDisplay string message string language
This means the other side has passed along some debugging info.
Parameters | service | (type: SSHService
) |
Parameters | message | the message to send.
(type: str
) |
alwaysDisplay | if True, tell the other side to always display this message.
(type: bool
) | |
language | optionally, the language the message is in.
(type: str
) |
Parameters | message | data to send with the message
(type: str
) |
Parameters | reason | the reason for the disconnect. Should be one of the DISCONNECT_* values.
(type: int
) |
desc | a descrption of the reason for the disconnection.
(type: str
) |
Parameters | c | (type: str
) |
sharedSecret | (type: str
) | |
exchangeHash | (type: str
) |
Parameters | sharedSecret | a secret string agreed upon using a Diffie- Hellman exchange, so it is only
shared between the server and the client.
(type: str
) |
exchangeHash | A hash of various data known by both sides.
(type: str
) |
Parameters | reasonCode | the reason for the disconnect, one of the DISCONNECT_ values.
(type: int
) |
description | a human-readable description of the disconnection.
(type: str
) |
Parameters | seqnum | the sequence number that was not understood.
(type: int
) |
Parameters | alwaysDisplay | if True, this message should always be displayed.
(type: bool
) |
message | the debug message
(type: str
) | |
lang | optionally the language the message is in.
(type: str
) |