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``

module documentation
(source)

Provide `ICredentialsChecker` implementations to be used in Conch protocols.

Interface | `IAuthorizedKeysDB` | An object that provides valid authorized ssh keys mapped to usernames.
Class | `InMemorySSHKeyDB` | Object that provides SSH public keys based on a dictionary of usernames mapped to `twisted.conch.ssh.keys.Key`s.
Class | `SSHProtocolChecker` | SSHProtocolChecker is a checker that requires multiple authentications to succeed. To add a checker, call my registerChecker method with the checker and the interface.
Class | `SSHPublicKeyChecker` | Checker that authenticates SSH public keys, based on public keys listed in authorized_keys and authorized_keys2 files in user .ssh/ directories.
Class | `SSHPublicKeyDatabase` | Checker that authenticates SSH public keys, based on public keys listed in authorized_keys and authorized_keys2 files in user .ssh/ directories.
Class | `UNIXAuthorizedKeysFiles` | Object that provides SSH public keys based on public keys listed in authorized_keys and authorized_keys2 files in UNIX user .ssh/ directories. If any of the files cannot be read, a message is logged but that file is otherwise ignored.
Class | `UNIXPasswordDatabase` | A checker which validates users out of the UNIX password databases, or databases of a compatible format.
Function | `readAuthorizedKeyFile` | Reads keys from an authorized keys file. Any non-comment line that cannot be parsed as a key will be ignored, although that particular line will be logged.
Function | `_keysFromFilepaths` | Helper function that turns an iterable of filepaths into a generator of keys. If any file cannot be read, a message is logged but it is otherwise ignored.
Function | `_pwdGetByName` | Look up a user in the /etc/passwd database using the pwd module. If the pwd module is not available, return None.
Function | `_shadowGetByName` | Look up a user in the /etc/shadow database using the spwd module. If it is not available, return `None`.
Variable | `_log` | Undocumented

def readAuthorizedKeyFile(fileobj, parseKey=keys.Key.fromString): (source)

Reads keys from an authorized keys file. Any non-comment line that cannot be parsed as a key will be ignored, although that particular line will be logged.

Parameters
fileobj:`BinaryIO` | something from which to read lines which can be parsed as keys
parseKey:`Callable[[bytes], keys.Key]` | a callable that takes bytes and returns a `twisted.conch.ssh.keys.Key`, mainly to be used for testing. The default is `twisted.conch.ssh.keys.Key.fromString`.
Returns
`Iterator[keys.Key]` | an iterable of `twisted.conch.ssh.keys.Key`
Present Since
15.0

def _keysFromFilepaths(filepaths, parseKey): (source)

Helper function that turns an iterable of filepaths into a generator of keys. If any file cannot be read, a message is logged but it is otherwise ignored.

Parameters
filepaths:iterable | iterable of `twisted.python.filepath.FilePath`.
parseKey:`callable` | a callable that takes a string and returns a `twisted.conch.ssh.keys.Key`
Returns
generator | generator of `twisted.conch.ssh.keys.Key`
Present Since
15.0

def _pwdGetByName(username): (source)

Look up a user in the /etc/passwd database using the pwd module. If the pwd module is not available, return None.

Parameters
username:`str` | the username of the user to return the passwd database information for.

def _shadowGetByName(username): (source)

Look up a user in the /etc/shadow database using the spwd module. If it is not available, return `None`.

Parameters
username:`str` | the username of the user to return the shadow database information for.

_log = (source)

Undocumented