Profile
SSH Keys List
https://api.linode.com/v4/profile/sshkeys
Returns a collection of SSH Keys you've added to your Profile.
Query Parameters
The page of a collection to return.
The number of items to return per page.
Request Samples
- Shell
- CLI
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/sshkeys
Response Samples
- 200
- default
{
"data": [
{
"id": "",
"created": "2018-01-01T00:01:01",
"label": "My SSH Key",
"ssh_key": "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
}
],
"page": 1,
"pages": 1,
"results": 1
}
Responses
200: Returns a paginated list of SSH Key objects.
The unique identifier of an SSH Key object.
The date this key was added.
A label for the 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)
The current page.
The total number of pages.
The total number of results.
default: Error
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.
SSH Key Add
https://api.linode.com/v4/profile/sshkeys
Adds an SSH Key to your Account profile.
Request Body Schema
A label for the 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)
Request Samples
- Shell
- CLI
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "My SSH Key",
"ssh_key": "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
}' \
https://api.linode.com/v4/profile/sshkeys
Response Samples
- 200
- default
{
"created": "2018-01-01T00:01:01",
"id": 1234,
"label": "My SSH Key",
"ssh_key": "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
}
Responses
200: SSH Key associated successfully.
The date this key was added.
The unique identifier of an SSH Key object.
A label for the 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)
default: Error
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.