Retrieve an Existing SSH Key
To get information about a key, send a GET request to /v2/account/keys/$KEY_ID or /v2/account/keys/$KEY_FINGERPRINT. 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.
Path parameters
Either the ID or the fingerprint of an existing SSH key.
Response
A JSON object with the key set to ssh_key. The value is an ssh_key object containing the standard ssh_key attributes.
Example response
{
"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"
}
}Changes
Changed in 4 of the 8 revisions of this API.14
- ○
api tag
DigitalOcean-public.v2-new_SSH Keysaddedapi-tag-added
- ○
api tag
SSH Keysremovedapi-tag-removed
This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
endpoint added
endpoint-added
This revision also has 70 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ▲
api path removed without deprecation
api-path-removed-without-deprecation
This revision also has 436 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
endpoint added
endpoint-added
This revision also has 70 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○