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, fingerprintfrom digitalocean_keywhere id = 29280599;
select id, name, fingerprintfrom digitalocean_keywhere 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, fingerprintfrom digitalocean_keywhere fingerprint = '3a:84:c2:cc:77:e9:ea:95:5b:45:c3:4d:92:fc:4a:ac';
select id, name, fingerprintfrom digitalocean_keywhere fingerprint = '3a:84:c2:cc:77:e9:ea:95:5b:45:c3:4d:92:fc:4a:ac';
Schema for digitalocean_key
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
fingerprint | text | = | The fingerprint value that is generated from the public key. |
id | bigint | = | This is a unique identification number for the key. |
name | text | The human-readable display name for the given SSH key. | |
public_key | text | The 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. | |
tags | jsonb | A map of tags for the resource. | |
title | text | Title of the resource. |