creds.ssh¶
PublicKey ([raw, b64encoded]) |
Representation of a public key. |
-
class
creds.ssh.
PublicKey
(raw=None, b64encoded=None)[source]¶ Representation of a public key.
-
b64encoded
¶ Return a base64 encoding of the key.
Returns: base64 encoding of the public key Return type: str
-
raw
¶ Return raw key.
Returns: raw key Return type: str
-
Read public keys from specified user’s authorized_keys file.
Parameters: username (str) – username. Returns: Authorised keys for the specified user. Return type: list
Write public keys back to authorized_keys file. Create keys directory if it doesn’t already exist.
Parameters: user (User) – Instance of User containing keys. Returns: Authorised keys for the specified user. Return type: list