ssh_keys
Creates, updates, deletes, gets or lists a ssh_keys
resource.
Overview
Name | ssh_keys |
Type | Resource |
Id | linode.profile.ssh_keys |
Fields
The following fields are returned by SELECT
queries:
- get_ssh_key
- get_ssh_keys
An SSH Key object.
Name | Datatype | Description |
---|---|---|
id | integer | Read-only The unique identifier of an SSH Key object. |
created | string (date-time) | Read-only The date this key was added. (example: 2018-01-01T00:01:01) |
label | string | A label for the SSH Key. (example: My SSH Key) |
ssh_key | string (ssh-key) | The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy. Accepted formats: - ssh-dss - ssh-rsa - ecdsa-sha2-nistp - ssh-ed25519 - sk-ecdsa-sha2-nistp256 (Akamai-specific) (example: ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_ssh_key | select | Returns a single SSH Key object identified by id that you have access to view.Learn more... Learn more... | ||
get_ssh_keys | select | page , page_size | Returns a collection of SSH Keys you've added to your Profile. Learn more... Learn more... | |
post_add_ssh_key | insert | Adds an SSH Key to your Account profile. Learn more... Learn more... | ||
put_ssh_key | replace | Updates an SSH Key that you have permission to read_write .Only SSH key labels can be updated. Learn more... Learn more... | ||
delete_ssh_key | delete | Deletes an SSH Key you have access to. > 📘 > > This operation only deletes a key's association from your profile. It doesn't remove it from any Linode or disk that was deployed with authorized_keys . You need to manually delete the key on the Linode or disk.Learn more... Learn more... |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
page | integer | The page of a collection to return. |
page_size | integer | The number of items to return per page. |
SELECT
examples
- get_ssh_key
- get_ssh_keys
Returns a single SSH Key object identified by id
that you have access to view.
Learn more...
Learn more...
SELECT
id,
created,
label,
ssh_key
FROM linode.profile.ssh_keys;
Returns a collection of SSH Keys you've added to your Profile.
Learn more...
Learn more...
SELECT
data,
page,
pages,
results
FROM linode.profile.ssh_keys
WHERE page = '{{ page }}'
AND page_size = '{{ page_size }}';
INSERT
examples
- post_add_ssh_key
- Manifest
Adds an SSH Key to your Account profile.
Learn more...
Learn more...
INSERT INTO linode.profile.ssh_keys (
data__label,
data__ssh_key
)
SELECT
'{{ label }}',
'{{ ssh_key }}'
RETURNING
id,
created,
label,
ssh_key
;
# Description fields are for documentation purposes
- name: ssh_keys
props:
- name: label
value: string
description: >
A label for the SSH Key.
- name: ssh_key
value: string
description: >
The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.
Accepted formats:
- ssh-dss
- ssh-rsa
- ecdsa-sha2-nistp
- ssh-ed25519
- sk-ecdsa-sha2-nistp256 (Akamai-specific)
REPLACE
examples
- put_ssh_key
Updates an SSH Key that you have permission to read_write
.
Only SSH key labels can be updated.
Learn more...
Learn more...
REPLACE linode.profile.ssh_keys
SET
data__label = '{{ label }}'
WHERE
RETURNING
id,
created,
label,
ssh_key;
DELETE
examples
- delete_ssh_key
Deletes an SSH Key you have access to.
> 📘
>
> This operation only deletes a key's association from your profile. It doesn't remove it from any Linode or disk that was deployed with authorized_keys
. You need to manually delete the key on the Linode or disk.
Learn more...
Learn more...
DELETE FROM linode.profile.ssh_keys;