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

Class SshUserAuth

source code

           twisted.python.log.Logger --+        
                                       |        
    twisted.conch.ssh.service.SSHService --+    
                                           |    
twisted.conch.ssh.userauth.SSHUserAuthClient --+
                                               |
                                              SshUserAuth

Class to gather credentials for use with our SSH connection, and use them to authenticate against the remote device.

Instance Methods [hide private]
 
__init__(self, user, instance, factory)
If no username is supplied, defaults to the user running this code (eg zenoss)
source code
Twisted deferred object
getPassword(self, unused=None)
Return a deferred object of success if there's a password or return fail (ie no zCommandPassword specified)
source code
string
getPublicKey(self)
Return the SSH public key (using the zProperty zKeyPath) or None
source code
 
ssh_USERAUTH_FAILURE(self, packet)
Called when the SSH session can't authenticate.
source code
Twisted deferred object
getPrivateKey(self)
Return a deferred with the SSH private key (using the zProperty zKeyPath)
source code

Inherited from twisted.conch.ssh.userauth.SSHUserAuthClient: askForAuth, auth_keyboard_interactive, auth_password, auth_publickey, getGenericAnswers, serviceStarted, signData, ssh_USERAUTH_PK_OK, ssh_USERAUTH_SUCCESS, tryAuth

Inherited from twisted.conch.ssh.userauth.SSHUserAuthClient (private): _cbGenericAnswers, _cbPassword, _cbSignData, _cbSignedData, _ebAuth, _setNewPass, _setOldPass

Inherited from twisted.conch.ssh.service.SSHService: logPrefix, packetReceived, serviceStopped

Class Variables [hide private]

Inherited from twisted.conch.ssh.userauth.SSHUserAuthClient: name, preferredOrder, protocolMessages

Inherited from twisted.conch.ssh.service.SSHService: transport

Method Details [hide private]

__init__(self, user, instance, factory)
(Constructor)

source code 
If no username is supplied, defaults to the user running this code (eg zenoss)
Parameters:
  • user (string) - username
  • instance (object) - instance object
  • factory (Twisted factory object) - factory info
Overrides: twisted.conch.ssh.userauth.SSHUserAuthClient.__init__

getPassword(self, unused=None)

source code 
Return a deferred object of success if there's a password or return fail (ie no zCommandPassword specified)
Parameters:
  • unused (string) - unused (unused)
Returns: Twisted deferred object
Twisted deferred object (defer.succeed or defer.fail)
Overrides: twisted.conch.ssh.userauth.SSHUserAuthClient.getPassword

getPublicKey(self)

source code 
Return the SSH public key (using the zProperty zKeyPath) or None
Returns: string
SSH public key
Overrides: twisted.conch.ssh.userauth.SSHUserAuthClient.getPublicKey

ssh_USERAUTH_FAILURE(self, packet)

source code 

Called when the SSH session can't authenticate.
NB: This function is also called as an initializer
    to start the connections.

@param packet: returned packet from the host
@type packet: object

Overrides: twisted.conch.ssh.userauth.SSHUserAuthClient.ssh_USERAUTH_FAILURE

getPrivateKey(self)

source code 
Return a deferred with the SSH private key (using the zProperty zKeyPath)
Returns: Twisted deferred object
Twisted deferred object (defer.succeed)
Overrides: twisted.conch.ssh.userauth.SSHUserAuthClient.getPrivateKey