Package Products :: Package DataCollector :: Module SshClient :: Class SshClientTransport |
[hide private]
[frames] | no frames]

# Class SshClientTransport

source code

    twisted.internet.protocol.BaseProtocol --+
                                             |
            twisted.internet.protocol.Protocol --+
                                                 |
      twisted.conch.ssh.transport.SSHTransportBase --+
                                                     |
        twisted.conch.ssh.transport.SSHClientTransport --+
                                                         |
                                                        SshClientTransport

Base client class for constructing Twisted Conch services. This class is *only* responsible for connecting to the SSH service on the device, and ensuring that *host* keys are sane.

Instance Methods | [hide private]
Twisted deferred object (defer.succeed(1) |
verifyHostKey(self, hostKey, fingerprint) Module to verify the host's SSH key against the stored fingerprint we have from the last time that we communicated with the host. | source code
connectionMade(self) Called after the connection has been made. | source code
receiveError(self, reasonCode, description) Called when a disconnect error message was received from the device. | source code
receiveUnimplemented(self, seqnum) Called when an unimplemented packet message was received from the device. | source code
receiveDebug(self, alwaysDisplay, message, lang) Called when a debug message was received from the device. | source code
connectionSecure(self) This is called after the connection is set up and other services can be run. | source code
Inherited from `twisted.conch.ssh.transport.SSHClientTransport`: `requestService`, `ssh_KEXINIT`, `ssh_KEX_DH_GEX_GROUP`, `ssh_KEX_DH_GEX_REPLY`, `ssh_NEWKEYS`, `ssh_SERVICE_ACCEPT` Inherited from `twisted.conch.ssh.transport.SSHClientTransport` (private): `_continueGEX_REPLY`, `_continueKEXDH_REPLY`, `_keySetup`, `_ssh_KEXDH_REPLY` Inherited from `twisted.conch.ssh.transport.SSHTransportBase`: `connectionLost`, `dataReceived`, `dispatchMessage`, `getPacket`, `isEncrypted`, `isVerified`, `loseConnection`, `sendDebug`, `sendDisconnect`, `sendIgnore`, `sendKexInit`, `sendPacket`, `sendUnimplemented`, `setService`, `ssh_DEBUG`, `ssh_DISCONNECT`, `ssh_IGNORE`, `ssh_UNIMPLEMENTED` Inherited from `twisted.conch.ssh.transport.SSHTransportBase` (private): `_allowedKeyExchangeMessageType`, `_getKey`, `_newKeys`, `_unsupportedVersionReceived` Inherited from `twisted.internet.protocol.BaseProtocol`: `makeConnection`

Class Variables | [hide private]
Inherited from `twisted.conch.ssh.transport.SSHTransportBase` (private): `_KEY_EXCHANGE_NONE`, `_KEY_EXCHANGE_PROGRESSING`, `_KEY_EXCHANGE_REQUESTED` Inherited from `twisted.internet.protocol.BaseProtocol`: `connected`, `transport`

Instance Variables | [hide private]
Inherited from `twisted.conch.ssh.transport.SSHClientTransport`: `e`, `g`, `instance`, `isClient`, `p`, `x` Inherited from `twisted.conch.ssh.transport.SSHClientTransport` (private): `_gotNewKeys` Inherited from `twisted.conch.ssh.transport.SSHTransportBase`: `buf`, `comment`, `currentEncryptions`, `first`, `gotVersion`, `incomingCompression`, `incomingCompressionType`, `incomingPacketSequence`, `kexAlg`, `keyAlg`, `nextEncryptions`, `otherKexInitPayload`, `otherVersionString`, `ourKexInitPayload`, `ourVersionString`, `outgoingCompression`, `outgoingCompressionType`, `outgoingPacketSequence`, `protocolVersion`, `service`, `sessionID`, `supportedCiphers`, `supportedCompressions`, `supportedKeyExchanges`, `supportedLanguages`, `supportedMACs`, `supportedPublicKeys`, `supportedVersions`, `version` Inherited from `twisted.conch.ssh.transport.SSHTransportBase` (private): `_blockedByKeyExchange`, `_keyExchangeState`

Method Details | [hide private]

### verifyHostKey(self, hostKey, fingerprint) | source code
Module to verify the host's SSH key against the stored fingerprint we have from the last time that we communicated with the host. NB: currently does not verify this information but simply trusts every host key Parameters: `hostKey` (string) - host's SSH key (unused) `fingerprint` (string) - host fingerprint (unused) Returns: Twisted deferred object (defer.succeed(1) Twisted deferred object Overrides: twisted.conch.ssh.transport.SSHClientTransport.verifyHostKey To Do: verify the host key

### connectionMade(self) | source code
Called after the connection has been made. Used to set up private instance variables. Overrides: twisted.internet.protocol.BaseProtocol.connectionMade

### receiveError(self, reasonCode, description) | source code
Called when a disconnect error message was received from the device. Parameters: `reasonCode` (integer) - error code from SSH connection failure `description` (string) - human-readable version of the error code Overrides: twisted.conch.ssh.transport.SSHTransportBase.receiveError

### receiveUnimplemented(self, seqnum) | source code
Called when an unimplemented packet message was received from the device. Parameters: `seqnum` (integer) - SSH message code Overrides: twisted.conch.ssh.transport.SSHTransportBase.receiveUnimplemented

### receiveDebug(self, alwaysDisplay, message, lang) | source code
Called when a debug message was received from the device. Parameters: `alwaysDisplay` (integer) - boolean-type code to indicate if the message is to be displayed `message` (string) - debug message from remote device `lang` (integer) - language code Overrides: twisted.conch.ssh.transport.SSHTransportBase.receiveDebug

### connectionSecure(self) | source code
This is called after the connection is set up and other services can be run. This function starts the SshUserAuth client (ie the Connection client). Overrides: twisted.conch.ssh.transport.SSHClientTransport.connectionSecure