Profile

View SSH Key

get
https://api.linode.com/v4/profile/sshkeys/{sshKeyId}

Returns a single SSH Key object identified by id that you have access to view.

Authorizations

Personal Access Token
OAuth: ( account:read_only)

Path Parameters

sshKeyId
Required
integer

The ID of the SSHKey

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
    https://api.linode.com/v4/profile/sshkeys/42

Response Samples

{
  "id": 1234,
  "created": "2018-01-01T00:01:01",
  "label": "My SSH Key",
  "ssh_key": ""
}

Responses

200: An SSH Key object

id
integer

The unique identifier of an SSH Key object.

created
string <date-time>

The date this key was added.

label
string <= 64 characters

A label for the 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.

default: Error

errors
array of objects
reason
string

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.

field
string

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.

Update SSH Key

put
https://api.linode.com/v4/profile/sshkeys/{sshKeyId}

Updates an SSH Key that you have permission to read_write.

Authorizations

Personal Access Token
OAuth: ( account:read_write)

Path Parameters

sshKeyId
Required
integer

The ID of the SSHKey

Request Body Schema

label
string <= 64 characters

A label for the SSH Key.

Request Samples

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    -X PUT -d '{
      "label": "my laptop"
    }' \
    https://api.linode.com/v4/profile/sshkey/42

Response Samples

{
  "id": 1234,
  "label": "My SSH Key",
  "created": "2018-01-01T00:01:01",
  "ssh_key": ""
}

Responses

200: SSH Key updated successfully.

id
integer

The unique identifier of an SSH Key object.

label
string <= 64 characters

A label for the SSH Key.

created
string <date-time>

The date this key was added.

ssh_key
string <ssh-key>

The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.

default: Error

errors
array of objects
reason
string

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.

field
string

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.

Delete SSH Key

delete
https://api.linode.com/v4/profile/sshkeys/{sshKeyId}

Deletes an SSH Key you have access to.

Note: deleting an SSH Key will not remove it from any Linode or Disk that was deployed with authorized_keys. In those cases, the keys must be manually deleted on the Linode or Disk. This endpoint will only delete the key's association from your Profile.

Authorizations

Personal Access Token
OAuth: ( account:read_write)

Path Parameters

sshKeyId
Required
integer

The ID of the SSHKey

Request Samples

curl -H "Content-Type: application/json" \
    -H "Authoriztion: Bearer $TOKEN" \
    -X DELETE \
    https://api.linode.com/v4/profile/sshkeys/42

Response Samples

{}

Responses

200: SSH Key deleted successfully.

default: Error

errors
array of objects
reason
string

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.

field
string

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.