---
title: sshkey
description: Canonical makes open source secure, reliable and easy to use, providing
  support for Ubuntu and a portfolio of enterprise-grade technologies. Founded in
  2004, Canonical operates globally with team members in over 80 countries.
url: https://canonical-com-2934.demos.haus/maas/docs/sshkey?format=md
---

*Submit*

# sshkey

Enter keyword arguments in the form `key=value`.

## [Delete an SSH key](https://canonical-com-2934.demos.haus/maas/docs/sshkey?format=md#p-23251-delete-an-ssh-key)

```
maas $PROFILE sshkey delete [--help] [-d] [-k] id [data ...]
```

#### Positional arguments

* id

Deletes the SSH key with the given ID.

#### Keyword “id”

Required Int. An SSH key ID.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit |
| -d, --debug | Display more information about API responses |
| -k, --insecure | Disable SSL certificate check |

## [Retrieve an SSH key](https://canonical-com-2934.demos.haus/maas/docs/sshkey?format=md#p-23251-retrieve-an-ssh-key)

```
maas $PROFILE sshkey read [--help] [-d] [-k] id [data ...]
```

#### Positional arguments

* id

Retrieves an SSH key with the given ID.

#### Keyword “id”

Required Int. An SSH key ID.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit |
| -d, --debug | Display more information about API responses |
| -k, --insecure | Disable SSL certificate check |

## [Import SSH keys](https://canonical-com-2934.demos.haus/maas/docs/sshkey?format=md#p-23251-import-ssh-keys)

```
maas $PROFILE sshkeys import [--help] [-d] [-k] [data ...]
```

Import the requesting user’s SSH keys for a given protocol and authorization ID in `protocol:auth_id` format.

#### Keyword “keysource”

Required String. The source of the keys to import should be provided in the request payload as form data, for example:

`source:user`

* `source`: lp (Launchpad), gh (GitHub)
* `user`: User login

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit |
| -d, --debug | Display more information about API responses |
| -k, --insecure | Disable SSL certificate check |

## [List SSH keys](https://canonical-com-2934.demos.haus/maas/docs/sshkey?format=md#p-23251-list-ssh-keys)

```
maas $PROFILE sshkeys read [--help] [-d] [-k] [data ...]
```

List all keys belonging to the requesting user.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit |
| -d, --debug | Display more information about API responses |
| -k, --insecure | Disable SSL certificate check |

---

[Previous

space](https://canonical-com-2934.demos.haus/maas/docs/space)
[Next

sslkey](https://canonical-com-2934.demos.haus/maas/docs/sslkey)

Last updated 1 year, 4 months ago. [Help improve this document in the forum](https://discourse.maas.io/t/sshkey/11371).
