pydo.ssh_keys.get()

Generated on 3 Aug 2026 from pydo version v0.40.0

Usage

client.ssh_keys.get(ssh_key_identifier=512189)
Returns JSONRaises HttpResponseError

Description

To get information about a key, send a GET request to /v2/account/keys/{ssh_key_identifier} or /v2/account/keys/{ssh_key_identifier}. The response will be a JSON object with the key ssh_key and value an ssh_key object which contains the standard ssh_key attributes.

Parameters

ssh_key_identifier object required

Either the ID or the fingerprint of an existing SSH key.

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

resp = client.ssh_keys.get(ssh_key_identifier=512190)

Response Example

Show Response Example
{
  "ssh_key": {
    "id": 512189,
    "fingerprint": "3b:16:bf:e4:8b:00:8b:b8:59:8c:a9:d3:f0:19:45:fa",
    "public_key": "ssh-rsa AEXAMPLEaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example",
    "name": "My SSH Public Key"
  }
}

More Information

See /v2/account/keys/{ssh_key_identifier} in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.