class documentation
class UNIXAuthorizedKeysFiles: (source)
Constructor: UNIXAuthorizedKeysFiles(userdb, parseKey)
Implements interfaces: twisted.conch.checkers.IAuthorizedKeysDB
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.
| Present Since | |
| 15.0 |
| Method | __init__ |
Initializes a new UNIXAuthorizedKeysFiles. |
| Method | get |
Gets an iterable of authorized keys that are valid for the given avatarId. |
| Instance Variable | _parse |
Undocumented |
| Instance Variable | _userdb |
Undocumented |
def __init__(self, userdb:
UserDB | None = None, parseKey: Callable[ [ bytes], keys.Key] = keys.Key.fromString):
(source)
¶
Initializes a new UNIXAuthorizedKeysFiles.
| Parameters | |
userdb:UserDB | None | access to the Unix user account and password database (default is the Python module pwd, if available) |
parseCallable[ | a callable that takes a string and returns a twisted.conch.ssh.keys.Key, mainly to be used for testing. The default is twisted.conch.ssh.keys.Key.fromString. |
Gets an iterable of authorized keys that are valid for the given avatarId.
| Parameters | |
username:bytes | Undocumented |
avatartwisted.cred.checkers.ICredentialsChecker.requestAvatarId | the ID of the avatar |
| Returns | |
Iterable[ | an iterable of twisted.conch.ssh.keys.Key |