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

# Class SshConnection

source code

             twisted.python.log.Logger --+
                                         |
      twisted.conch.ssh.service.SSHService --+
                                             |
    twisted.conch.ssh.connection.SSHConnection --+
                                                 |
                                                SshConnection

Wrapper class that starts channels on top of connections.

Instance Methods | [hide private]
__init__(self, factory) Initializer | source code
ssh_CHANNEL_FAILURE(self, packet) Called when the SSH session can't authenticate | source code
ssh_CHANNEL_OPEN_FAILURE(self, packet) Called when the SSH session can't authenticate | source code
ssh_REQUEST_FAILURE(self, packet) Called when the SSH session can't authenticate | source code
openFailed(self, reason) Called when the connection open() fails. | source code
serviceStarted(self) Called when the service is active on the transport | source code
addCommand(self, cmd) Open a new channel for each command in queue | source code
channelClosed(self, channel) Called when a channel is closed. | source code
Inherited from `twisted.conch.ssh.connection.SSHConnection`: `adjustWindow`, `getChannel`, `gotGlobalRequest`, `openChannel`, `sendClose`, `sendData`, `sendEOF`, `sendExtendedData`, `sendGlobalRequest`, `sendRequest`, `serviceStopped`, `ssh_CHANNEL_CLOSE`, `ssh_CHANNEL_DATA`, `ssh_CHANNEL_EOF`, `ssh_CHANNEL_EXTENDED_DATA`, `ssh_CHANNEL_OPEN`, `ssh_CHANNEL_OPEN_CONFIRMATION`, `ssh_CHANNEL_REQUEST`, `ssh_CHANNEL_SUCCESS`, `ssh_CHANNEL_WINDOW_ADJUST`, `ssh_GLOBAL_REQUEST`, `ssh_REQUEST_SUCCESS` Inherited from `twisted.conch.ssh.connection.SSHConnection` (private): `_cbChannelRequest`, `_ebChannelRequest` Inherited from `twisted.conch.ssh.service.SSHService`: `logPrefix`, `packetReceived`

Class Variables | [hide private]
Inherited from `twisted.conch.ssh.connection.SSHConnection`: `name`, `protocolMessages` Inherited from `twisted.conch.ssh.service.SSHService`: `transport`

Instance Variables | [hide private]
Inherited from `twisted.conch.ssh.connection.SSHConnection`: `channels`, `channelsToRemoteChannel`, `deferreds`, `localChannelID`, `localToRemoteChannel`

Method Details | [hide private]

### __init__(self, factory) (Constructor) | source code
Initializer Parameters: `factory` (Twisted factory object) - factory containing the connection info Overrides: twisted.conch.ssh.connection.SSHConnection.__init__

### ssh_CHANNEL_FAILURE(self, packet) | source code
Called when the SSH session can't authenticate Parameters: `packet` (object) - returned packet from the host Overrides: twisted.conch.ssh.connection.SSHConnection.ssh_CHANNEL_FAILURE

### ssh_CHANNEL_OPEN_FAILURE(self, packet) | source code
Called when the SSH session can't authenticate Parameters: `packet` (object) - returned packet from the host Overrides: twisted.conch.ssh.connection.SSHConnection.ssh_CHANNEL_OPEN_FAILURE

### ssh_REQUEST_FAILURE(self, packet) | source code
Called when the SSH session can't authenticate Parameters: `packet` - returned packet from the host Overrides: twisted.conch.ssh.connection.SSHConnection.ssh_REQUEST_FAILURE

### openFailed(self, reason) | source code
    Called when the connection open() fails.
    Usually this gets called after too many bad connection attempts,
    and the remote device gets upset with us.

    NB: reason.desc is the human-readable description of the failure
        reason.code is the SSH error code
     (see http://tools.ietf.org/html/rfc4250#section-4.2.2 for more details)

    @param reason: reason object
    @type reason: reason object

### serviceStarted(self) | source code
Called when the service is active on the transport Overrides: twisted.conch.ssh.connection.SSHConnection.serviceStarted

### addCommand(self, cmd) | source code
Open a new channel for each command in queue Parameters: `cmd` (string) - command to run

### channelClosed(self, channel) | source code
Called when a channel is closed. REQUIRED function by Twisted. Parameters: `channel` (Twisted channel object) - channel that closed Overrides: twisted.conch.ssh.connection.SSHConnection.channelClosed