turbot/digitalocean
steampipe plugin install digitalocean

Table: digitalocean_key - Query DigitalOcean SSH Keys using SQL

DigitalOcean SSH Keys are a secure way of logging into a virtual private server with SSH than using a password. With SSH keys, users can log into a server without a password. They provide a more secure way of logging into a server with SSH than using a password alone.

Table Usage Guide

The digitalocean_key table provides insights into SSH keys within DigitalOcean. As a DevOps engineer, explore key-specific details through this table, including key fingerprint, public key, and associated metadata. Utilize it to uncover information about keys, such as their names, ids, and the Droplets they are associated with.

Examples

List all keys

Explore all the keys available in your DigitalOcean account to better manage your resources and security settings. This can assist in identifying unused or unnecessary keys, thereby helping to streamline operations and enhance security.

select
*
from
digitalocean_key;
select
*
from
digitalocean_key;

Get a Key by ID

Analyze the settings to understand the specific details of a digital key using its unique identifier. This can be useful in managing and validating your digital keys for secure operations.

select
id,
name,
fingerprint
from
digitalocean_key
where
id = 29280599;
select
id,
name,
fingerprint
from
digitalocean_key
where
id = 29280599;

Get a Key by Fingerprint

Explore the specific digital key associated with a given fingerprint, which is useful for identifying and verifying the ownership of resources in a DigitalOcean environment. This could be particularly beneficial in scenarios where you need to audit resource access or troubleshoot permission issues.

select
id,
name,
fingerprint
from
digitalocean_key
where
fingerprint = '3a:84:c2:cc:77:e9:ea:95:5b:45:c3:4d:92:fc:4a:ac';
select
id,
name,
fingerprint
from
digitalocean_key
where
fingerprint = '3a:84:c2:cc:77:e9:ea:95:5b:45:c3:4d:92:fc:4a:ac';

Schema for digitalocean_key

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
fingerprinttext=The fingerprint value that is generated from the public key.
idbigint=This is a unique identification number for the key.
nametextThe human-readable display name for the given SSH key.
public_keytextThe entire public key string that was uploaded. This is what is embedded into the root user's authorized_keys file if you choose to include this SSH key during Droplet creation.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
tagsjsonbA map of tags for the resource.
titletextTitle of the resource.