SSH Keys
========

This section details SSH Key-related Linode CLI commands.

.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON
.. rst-class:: action-has-keywords

.. _commands_sshkeys_list:

`list <https://techdocs.akamai.com/linode-api/reference/get-ssh-keys>`_
-----------------------------------------------------------------------

.. rst-class:: action-keyword

:action-keyword-key:`Aliases:`
:action-keyword-values:`ls`


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

.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Usage

.. rst-class:: action-subheading-description

The format accepted by this command.



..  code-block:: bash

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



.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Sample

.. rst-class:: action-subheading-description

Examples of how this command might be used.




..  code-block:: bash

    linode-cli sshkeys list







.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Result Attributes

.. rst-class:: action-subheading-description

The attributes returned by this command.




.. rst-class:: action-attribute-section-table

..  list-table::
    :header-rows: 1
    :width: 100%
    :widths: 1 1 1 97

    * - Name
      - Type
      - Example
      - Description

    * - :action-table-field-name:`created` 
      - :action-table-field-type:`str`
      - :action-table-field-example:`2018-01-01T00:01:01`
      - The date this key was added.

    * - :action-table-field-name:`id` 
      - :action-table-field-type:`int`
      - :action-table-field-example:`42`
      - The unique identifier of an SSH Key object.

    * - :action-table-field-name:`label` 
      - :action-table-field-type:`str`
      - :action-table-field-example:`My SSH Key`
      - A label for the SSH Key.

    * - :action-table-field-name:`ssh_key` 
      - :action-table-field-type:`str`
      - :action-table-field-example:`ssh-rsa AAAA_...eir-computer`
      - The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.








------------

.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. _commands_sshkeys_view:

`view <https://techdocs.akamai.com/linode-api/reference/get-ssh-key>`_
----------------------------------------------------------------------


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

.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Usage

.. rst-class:: action-subheading-description

The format accepted by this command.



..  code-block:: bash

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



.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Sample

.. rst-class:: action-subheading-description

Examples of how this command might be used.




..  code-block:: bash

    linode-cli sshkeys view 42




.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Parameters

.. rst-class:: action-subheading-description

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




.. rst-class:: action-parameter-table

..  list-table::
    :header-rows: 1
    :width: 100%
    :widths: 1 1 98

    * - Name
      - Type
      - Description

    * - :action-table-field-name:`sshKeyId`
      - :action-table-field-type:`int`
      - The ID of the SSHKey.








.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Result Attributes

.. rst-class:: action-subheading-description

The attributes returned by this command.




.. rst-class:: action-attribute-section-table

..  list-table::
    :header-rows: 1
    :width: 100%
    :widths: 1 1 1 97

    * - Name
      - Type
      - Example
      - Description

    * - :action-table-field-name:`created` 
      - :action-table-field-type:`str`
      - :action-table-field-example:`2018-01-01T00:01:01`
      - The date this key was added.

    * - :action-table-field-name:`id` 
      - :action-table-field-type:`int`
      - :action-table-field-example:`42`
      - The unique identifier of an SSH Key object.

    * - :action-table-field-name:`label` 
      - :action-table-field-type:`str`
      - :action-table-field-example:`My SSH Key`
      - A label for the SSH Key.

    * - :action-table-field-name:`ssh_key` 
      - :action-table-field-type:`str`
      - :action-table-field-example:`ssh-rsa AAAA_...eir-computer`
      - The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.








------------

.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. _commands_sshkeys_create:

`create <https://techdocs.akamai.com/linode-api/reference/post-add-ssh-key>`_
-----------------------------------------------------------------------------


Adds an SSH Key to your Account profile.

.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Usage

.. rst-class:: action-subheading-description

The format accepted by this command.



..  code-block:: bash

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



.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Sample

.. rst-class:: action-subheading-description

Examples of how this command might be used.




..  code-block:: bash

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





.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Arguments

.. rst-class:: action-subheading-description

Additional fields used to execute this request.





.. rst-class:: action-argument-section-table

..  list-table::
    :header-rows: 1
    :width: 100%
    :widths: 1 1 1 97

    * - Name
      - Type
      - Example
      - Description

    * - :action-table-field-name:`\-\-label`
      - :action-table-field-type:`str`
      - :action-table-field-example:`My SSH Key`
      - A label for the SSH Key.

    * - :action-table-field-name:`\-\-ssh_key`
      - :action-table-field-type:`str`
      - :action-table-field-example:`ssh-rsa AAAA_...eir-computer`
      - The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.







.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Result Attributes

.. rst-class:: action-subheading-description

The attributes returned by this command.




.. rst-class:: action-attribute-section-table

..  list-table::
    :header-rows: 1
    :width: 100%
    :widths: 1 1 1 97

    * - Name
      - Type
      - Example
      - Description

    * - :action-table-field-name:`created` 
      - :action-table-field-type:`str`
      - :action-table-field-example:`2018-01-01T00:01:01`
      - The date this key was added.

    * - :action-table-field-name:`id` 
      - :action-table-field-type:`int`
      - :action-table-field-example:`42`
      - The unique identifier of an SSH Key object.

    * - :action-table-field-name:`label` 
      - :action-table-field-type:`str`
      - :action-table-field-example:`My SSH Key`
      - A label for the SSH Key.

    * - :action-table-field-name:`ssh_key` 
      - :action-table-field-type:`str`
      - :action-table-field-example:`ssh-rsa AAAA_...eir-computer`
      - The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.








------------

.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. _commands_sshkeys_update:

`update <https://techdocs.akamai.com/linode-api/reference/put-ssh-key>`_
------------------------------------------------------------------------


Updates an SSH Key that you have permission to ``read_write``.

.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Usage

.. rst-class:: action-subheading-description

The format accepted by this command.



..  code-block:: bash

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



.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Sample

.. rst-class:: action-subheading-description

Examples of how this command might be used.




..  code-block:: bash

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




.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Parameters

.. rst-class:: action-subheading-description

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




.. rst-class:: action-parameter-table

..  list-table::
    :header-rows: 1
    :width: 100%
    :widths: 1 1 98

    * - Name
      - Type
      - Description

    * - :action-table-field-name:`sshKeyId`
      - :action-table-field-type:`int`
      - The ID of the SSHKey.






.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Arguments

.. rst-class:: action-subheading-description

Additional fields used to execute this request.





.. rst-class:: action-argument-section-table

..  list-table::
    :header-rows: 1
    :width: 100%
    :widths: 1 1 1 97

    * - Name
      - Type
      - Example
      - Description

    * - :action-table-field-name:`\-\-label`
      - :action-table-field-type:`str`
      - :action-table-field-example:`My SSH Key`
      - A label for the SSH Key.







.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Result Attributes

.. rst-class:: action-subheading-description

The attributes returned by this command.




.. rst-class:: action-attribute-section-table

..  list-table::
    :header-rows: 1
    :width: 100%
    :widths: 1 1 1 97

    * - Name
      - Type
      - Example
      - Description

    * - :action-table-field-name:`created` 
      - :action-table-field-type:`str`
      - :action-table-field-example:`2018-01-01T00:01:01`
      - The date this key was added.

    * - :action-table-field-name:`id` 
      - :action-table-field-type:`int`
      - :action-table-field-example:`42`
      - The unique identifier of an SSH Key object.

    * - :action-table-field-name:`label` 
      - :action-table-field-type:`str`
      - :action-table-field-example:`My SSH Key`
      - A label for the SSH Key.

    * - :action-table-field-name:`ssh_key` 
      - :action-table-field-type:`str`
      - :action-table-field-example:`ssh-rsa AAAA_...eir-computer`
      - The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.









.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON
.. rst-class:: action-has-keywords

.. _commands_sshkeys_delete:

`delete <https://techdocs.akamai.com/linode-api/reference/delete-ssh-key>`_
---------------------------------------------------------------------------

.. rst-class:: action-keyword

:action-keyword-key:`Aliases:`
:action-keyword-values:`rm`


Deletes an SSH Key you have access to.

.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Usage

.. rst-class:: action-subheading-description

The format accepted by this command.



..  code-block:: bash

    linode-cli sshkeys delete [-h] sshKeyId



.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Sample

.. rst-class:: action-subheading-description

Examples of how this command might be used.




..  code-block:: bash

    linode-cli sshkeys delete 42




.. role:: action-keyword-key
.. role:: action-keyword-values
.. role:: action-table-field-name
.. role:: action-table-field-optional
.. role:: action-table-field-required
.. role:: action-table-field-type
.. role:: action-table-field-example
.. role:: action-argument-additional-details

.. role:: json(code)
    :language: JSON

.. rst-class:: action-subheading

Parameters

.. rst-class:: action-subheading-description

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




.. rst-class:: action-parameter-table

..  list-table::
    :header-rows: 1
    :width: 100%
    :widths: 1 1 98

    * - Name
      - Type
      - Description

    * - :action-table-field-name:`sshKeyId`
      - :action-table-field-type:`int`
      - The ID of the SSHKey.