Package twisted :: Package conch :: Package ssh :: Module userauth :: Class SSHUserAuthClient |
[show private | hide private]
[frames | no frames]

## Class SSHUserAuthClient

    SSHService --+
                 |
                SSHUserAuthClient

Known Subclasses:
  `SSHUserAuthClient`

Method Summary
| `__init__(self, user, instance)`
| `askForAuth(self, kind, extraData)`
| `auth_password(self)`
| `auth_publickey(self)`
`Deferred` | ``getPassword`(self, prompt)` Return a `Deferred`that will be called back with a password.
`Deferred` | ``getPrivateKey`(self)` Return a `Deferred`that will be called back with the private key corresponding to the last public key from getPublicKey().
`str`/`None` | ``getPublicKey`(self)` Return a public key for the user.
| ``packetReceived`(self, messageType, packet)` called when we receieve a packet on the transport (inherited from `SSHService`)
| ``serviceStarted`(self)` called when the service is active on the transport.
| ``serviceStopped`(self)` called when the service is stopped, either by the connection ending or by another service being started (inherited from `SSHService`)
| `ssh_USERAUTH_FAILURE(self, packet)`
| `ssh_USERAUTH_PK_OK(self, packet)`
| `ssh_USERAUTH_SUCCESS(self, packet)`
| `tryAuth(self, kind)`
| `_cbPassword(self, password)`
| `_cbPK_OK(self, privateKey)`
| `_ebPK_OK(self, ignored)`
| `_errPass(self, failure)`
| `_setNewPass(self, np)`
| `_setOldPass(self, op)`

Class Variable Summary
`str` | `name`
`dict` | `protocolMessages`

Method Details

### getPassword(self, prompt=None) Return a `Deferred` that will be called back with a password. prompt is a string to display for the password, or None for a generic 'user@hostname's password: '. Parameters: `prompt` (type=`str`/`None`) Returns: `Deferred`

### getPrivateKey(self) Return a `Deferred` that will be called back with the private key corresponding to the last public key from getPublicKey(). If the private key is not available, errback on the Deferred. Returns: `Deferred`

### getPublicKey(self) Return a public key for the user. If no more public keys are available, return None. Returns: `str`/`None`

### serviceStarted(self) called when the service is active on the transport. Overrides: `twisted.conch.ssh.service.SSHService.serviceStarted` (inherited documentation)

Class Variable Details

    ### name Type: `str` Value:
        'ssh-userauth'

    ### protocolMessages Type: `dict` Value:
        {50: 'MSG_USERAUTH_REQUEST',
         51: 'MSG_USERAUTH_FAILURE',
         52: 'MSG_USERAUTH_SUCCESS',
         53: 'MSG_USERAUTH_BANNER',
         60: 'MSG_USERAUTH_PK_OK',
         61: 'MSG_USERAUTH_INFO_RESPONSE'}

Generated by Epydoc 1.1 on Thu May 8 13:18:20 2003 | http://epydoc.sf.net