Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`conch`.`checkers`.`SSHPublicKeyDatabase``

class documentation

`class SSHPublicKeyDatabase: (source)`

Implements interfaces: `twisted.cred.checkers.ICredentialsChecker`

View In Hierarchy

Checker that authenticates SSH public keys, based on public keys listed in authorized_keys and authorized_keys2 files in user .ssh/ directories.

Method | `checkKey` | Retrieve files containing authorized keys and check against user credentials.
Method | `getAuthorizedKeysFiles` | Return a list of `FilePath` instances for authorized_keys files which might contain information about authorized keys for the given credentials.
Method | `requestAvatarId` | Validate credentials and produce an avatar ID.
Class Variable | `credentialInterfaces` | A list of sub-interfaces of `ICredentials` which specifies which I may check.
Method | `_cbRequestAvatarId` | Check whether the credentials themselves are valid, now that we know if the key matches the user.
Method | `_ebRequestAvatarId` | Undocumented

def checkKey(self, credentials): (source)

Retrieve files containing authorized keys and check against user credentials.

def getAuthorizedKeysFiles(self, credentials): (source)

Return a list of `FilePath` instances for authorized_keys files which might contain information about authorized keys for the given credentials.

On OpenSSH servers, the default location of the file containing the list of authorized public keys is $HOME/.ssh/authorized_keys.

$HOME/.ssh/authorized_keys2 is also returned, though it has been deprecated by OpenSSH since 2001.

Returns
A list of `FilePath` instances to files with the authorized keys.

def requestAvatarId(self, credentials): (source)
from `twisted.cred.checkers.ICredentialsChecker`

Validate credentials and produce an avatar ID.

Parameters
credentials | something which implements one of the interfaces in `credentialInterfaces`.
Returns
a `Deferred` which will fire with a `bytes` that identifies an avatar, an empty tuple to specify an authenticated anonymous user (provided as `twisted.cred.checkers.ANONYMOUS`) or fail with `UnauthorizedLogin`. Alternatively, return the result itself.
See Also
`twisted.cred.credentials`

credentialInterfaces = (source)
from `twisted.cred.checkers.ICredentialsChecker`

A list of sub-interfaces of `ICredentials` which specifies which I may check.

def _cbRequestAvatarId(self, validKey, credentials): (source)

Check whether the credentials themselves are valid, now that we know if the key matches the user.

Parameters
validKey | A boolean indicating whether or not the public key matches a key in the user's authorized_keys file.
credentials:`ISSHPrivateKey` provider | The credentials offered by the user.
Returns
The user's username, if authentication was successful.
Raises
`UnauthorizedLogin` | (as a failure) if the key does not match the user in `credentials`. Also raised if the user provides an invalid signature.
`ValidPublicKey` | (as a failure) if the key matches the user but the credentials do not include a signature. See `error.ValidPublicKey` for more information.

def _ebRequestAvatarId(self, f): (source)

Undocumented