SSH Keys

This section details SSH Key-related Linode CLI commands.

list

Aliases: ls

Returns a collection of SSH Keys you’ve added to your Profile.

Usage

The format accepted by this command.

linode-cli sshkeys list [-h] [--order-by {}] [--order {asc,desc}]

Sample

Examples of how this command might be used.

linode-cli sshkeys list

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

The date this key was added.

id

int

42

The unique identifier of an SSH Key object.

label

str

My SSH Key

A label for the SSH Key.

ssh_key

str

ssh-rsa AAAA_…eir-computer

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


view

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

Usage

The format accepted by this command.

linode-cli sshkeys view [-h] [--order-by {}] [--order {asc,desc}]
    sshKeyId

Sample

Examples of how this command might be used.

linode-cli sshkeys view 42

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

sshKeyId

int

The ID of the SSHKey.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

The date this key was added.

id

int

42

The unique identifier of an SSH Key object.

label

str

My SSH Key

A label for the SSH Key.

ssh_key

str

ssh-rsa AAAA_…eir-computer

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


create

Adds an SSH Key to your Account profile.

Usage

The format accepted by this command.

linode-cli sshkeys create [-h] [--label label]
    [--ssh_key ssh_key]

Sample

Examples of how this command might be used.

linode-cli sshkeys create \
    --label "My SSH Key" \
    --ssh_key "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--label

str

My SSH Key

A label for the SSH Key.

--ssh_key

str

ssh-rsa AAAA_…eir-computer

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

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

The date this key was added.

id

int

42

The unique identifier of an SSH Key object.

label

str

My SSH Key

A label for the SSH Key.

ssh_key

str

ssh-rsa AAAA_…eir-computer

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


update

Updates an SSH Key that you have permission to read_write.

Usage

The format accepted by this command.

linode-cli sshkeys update [-h] [--label label] sshKeyId

Sample

Examples of how this command might be used.

linode-cli sshkeys update 42 \
    --label "my laptop"

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

sshKeyId

int

The ID of the SSHKey.

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--label

str

My SSH Key

A label for the SSH Key.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

The date this key was added.

id

int

42

The unique identifier of an SSH Key object.

label

str

My SSH Key

A label for the SSH Key.

ssh_key

str

ssh-rsa AAAA_…eir-computer

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

delete

Aliases: rm

Deletes an SSH Key you have access to.

Usage

The format accepted by this command.

linode-cli sshkeys delete [-h] sshKeyId

Sample

Examples of how this command might be used.

linode-cli sshkeys delete 42

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

sshKeyId

int

The ID of the SSHKey.