class documentation

class twisted.conch.scripts.tkconch.SSHUserAuthClient(userauth.SSHUserAuthClient): (source)

View In Hierarchy

Undocumented

Class Variable usedFiles Undocumented
Method getPassword 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: '.
Method getPublicKey Return a public key for the user. If no more public keys are available, return None.
Method getPrivateKey Return a Deferred that will be called back with the private key object corresponding to the last public key from getPublicKey(). If the private key is not available, errback on the Deferred.
Method _cbGetPrivateKey Undocumented

Inherited from SSHUserAuthClient:

Instance Variable name the name of this service: 'ssh-userauth'
Instance Variable preferredOrder a list of authentication methods that should be used first, in order of preference, if supported by the server
Instance Variable user the name of the user to authenticate as
Instance Variable instance the service to start after authentication has finished
Instance Variable authenticatedWith a list of strings of authentication methods we've tried
Instance Variable triedPublicKeys a list of public key objects that we've tried to authenticate with
Instance Variable lastPublicKey the last public key object we've tried to authenticate with
Method __init__ Undocumented
Method serviceStarted called when the service is active on the transport.
Method askForAuth Send a MSG_USERAUTH_REQUEST.
Instance Variable lastAuth Undocumented
Method tryAuth Dispatch to an authentication method.
Method ssh_USERAUTH_SUCCESS We received a MSG_USERAUTH_SUCCESS. The server has accepted our authentication, so start the next service.
Method ssh_USERAUTH_FAILURE We received a MSG_USERAUTH_FAILURE. Payload:: string methods byte partial success
Method ssh_USERAUTH_PK_OK This message (number 60) can mean several different messages depending on the current authentication type. We dispatch to individual methods in order to handle this request.
Method ssh_USERAUTH_PK_OK_publickey This is MSG_USERAUTH_PK. Our public key is valid, so we create a signature and try to authenticate with it.
Method ssh_USERAUTH_PK_OK_password This is MSG_USERAUTH_PASSWD_CHANGEREQ. The password given has expired. We ask for an old password and a new password, then send both back to the server.
Method ssh_USERAUTH_PK_OK_keyboard_interactive This is MSG_USERAUTH_INFO_RESPONSE. The server has sent us the questions it wants us to answer, so we ask the user and sent the responses.
Method auth_publickey Try to authenticate with a public key. Ask the user for a public key; if the user has one, send the request to the server and return True. Otherwise, return False.
Method auth_password Try to authenticate with a password. Ask the user for a password. If the user will return a password, return True. Otherwise, return False.
Method auth_keyboard_interactive Try to authenticate with keyboard-interactive authentication. Send the request to the server and return True.
Method signData Sign the given data with the given public key.
Method getGenericAnswers Returns a Deferred with the responses to the promopts.
Method _ebAuth Generic callback for a failed authentication attempt. Respond by asking for the list of accepted methods (the 'none' method)
Method _cbUserauthFailure Undocumented
Instance Variable _oldPass Undocumented
Instance Variable _newPass Undocumented
Method _cbSignedData Called back out of self.signData with the signed data. Send the authentication request with the signature.
Method _setOldPass Called back when we are choosing a new password. Simply store the old password for now.
Method _setNewPass Called back when we are choosing a new password. Get the old password and send the authentication message with both.
Method _cbGenericAnswers Called back when we are finished answering keyboard-interactive questions. Send the info back to the server in a MSG_USERAUTH_INFO_RESPONSE.
Method _cbGetPublicKey Undocumented
Method _cbPassword Called back when the user gives a password. Send the request to the server.
Method _cbSignData Called back when the private key is returned. Sign the data and return the signature.

Inherited from SSHService (via SSHUserAuthClient):

Class Variable protocolMessages Undocumented
Class Variable transport Undocumented
Method serviceStopped called when the service is stopped, either by the connection ending or by another service being started
Method logPrefix Undocumented
Method packetReceived called when we receive a packet on the transport
Class Variable _log Undocumented
usedFiles = (source)

Undocumented

(type: List[str])
def getPassword(self, prompt=None): (source)

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: '.

ParameterspromptUndocumented (type: bytes/None)
ReturnsUndocumented (type: defer.Deferred)
def getPublicKey(self): (source)

Return a public key for the user. If no more public keys are available, return None.

This implementation always returns None. Override it in a subclass to actually find and return a public key object.

ReturnsUndocumented (type: Key or None)
def getPrivateKey(self): (source)

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

ReturnsUndocumented (type: Deferred called back with Key)
def _cbGetPrivateKey(self, ans, count): (source)

Undocumented

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.