SSH Keys¶
SSHKey¶
-
class
doapi.
SSHKey
[source]¶ An SSH key resource, representing an SSH public key that can be automatically added to the
/root/.ssh/authorized_keys
files of new droplets.New SSH keys are created via the
doapi.create_ssh_key()
method and can be retrieved with thedoapi.fetch_ssh_key()
anddoapi.fetch_all_ssh_keys()
methods.The DigitalOcean API specifies the following fields for SSH key objects:
Variables: -
__int__
()¶ Convert the resource to its unique integer ID
-
url
¶ The endpoint for general operations on the individual SSH key
-
fetch
()[source]¶ Fetch & return a new
SSHKey
object representing the SSH key’s current stateReturn type: SSHKey Raises: DOAPIError – if the API endpoint replies with an error (e.g., if the SSH key no longer exists)
-