# SSH keys

The SSH public keys that new SVMs of the organization get when they are created

Source: https://slashinfra.com/docs/api-reference/control/ssh-keys
Last modified: 2026-11-30T16:36:19.000Z

The SSH public keys that new SVMs of the organization get when they are created

Resource, request and plan limits are listed on [Limits](https://slashinfra.com/docs/reference/limits).

[Download OpenAPI specification](https://slashinfra.com/docs/control.openapi.json) · Version 0.1.0

[GETList the SSH keys](https://slashinfra.com/docs/api-reference/control/ssh-keys#getSsh-keys)[POSTAdd an SSH key](https://slashinfra.com/docs/api-reference/control/ssh-keys#postSsh-keys)[DELETEDelete an SSH key](https://slashinfra.com/docs/api-reference/control/ssh-keys#deleteSsh-keysById)

### List the SSH keys

GET

/ssh-keys

Returns the SSH public keys of the organization. SVMs created from now on get them in `~/.ssh/authorized_keys`; existing SVMs keep their own file.

#### Response Body

The SSH keys of the organization, oldest first; `[]` when there are none.

`application/json`

- response

- response
- …

The SSH keys of the organization, oldest first; `[]` when there are none.

`[index: integer]?`

One SSH public key of the organization.

Example Request

```
curl -X GET 'https://api.slashinfra.com/ssh-keys'
```

Example ResponseSchema

```
[  {    "added_by": "ada@example.com",    "created_ms": 1767225600000,    "fingerprint": "SHA256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU",    "id": "k5x2m8q1z0",    "name": "laptop",    "public_key": "string",    "type": "ssh-ed25519"  }]
```

### Add an SSH key

POST

/ssh-keys

Adds an SSH public key to the organization. SVMs created from now on get it in ~/.ssh/authorized_keys; existing SVMs do not change.

#### Request Body

- body

- body
- …

`name?`string

The optional name of the key in the list; without one, the key comment is the name, else its type.

Length`1 <= length <= 100`

`public_key*`string

One public key line, as `~/.ssh/id_ed25519.pub` holds it (`<type> <base64> [comment]`); Ed25519, ECDSA, their security-key forms and RSA of at least 2048 bits are accepted.

#### Response Body

One SSH public key of the organization.

`application/json`

- response

- response
- …

One SSH public key of the organization.

`added_by*`string

Who added the key: the email of a person, or `API key "<name>"` for an organization API key.

`created_ms*`integer

When the key was added, in milliseconds since the Unix epoch.

`fingerprint*`string

The SHA-256 fingerprint, as `ssh-keygen -lf` prints it.

`id*`string

The key id.

`name*`string

The name of the key.

`public_key*`string

The key without its comment: `<type> <base64>`.

`type*`string

The key type.

Example Request

```
curl -X POST 'https://api.slashinfra.com/ssh-keys' \  -H 'Content-Type: application/json' \  -d '{  "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl ada@laptop"}'
```

Example ResponseSchema

```
{  "added_by": "ada@example.com",  "created_ms": 1767225600000,  "fingerprint": "SHA256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU",  "id": "k5x2m8q1z0",  "name": "laptop",  "public_key": "string",  "type": "ssh-ed25519"}
```

### Delete an SSH key

DELETE

/ssh-keys/{id}

Deletes an SSH public key of the organization. SVMs created from now on do not get it; existing SVMs keep the keys in their own ~/.ssh/authorized_keys.

#### Path Parameters

`id*`string

The id of the key, from the list.

Length`1 <= length`

#### Response Body

The key is deleted, with no body; new SVMs no longer get it, and existing SVMs keep their own file.

`response?`string`text/plain`

The key is deleted, with no body; new SVMs no longer get it, and existing SVMs keep their own file.

Example Request

```
curl -X DELETE 'https://api.slashinfra.com/ssh-keys/string'
```

Example ResponseSchema

```
"string"
```

GET

/ssh-keys

Example Request

```
curl -X GET 'https://api.slashinfra.com/ssh-keys'
```

```
[
{
"added_by": "ada@example.com",
"created_ms": 1767225600000,
"fingerprint": "SHA256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU",
"id": "k5x2m8q1z0",
"name": "laptop",
"public_key": "string",
"type": "ssh-ed25519"
}
]
```

POST

/ssh-keys

Example Request

```
curl -X POST 'https://api.slashinfra.com/ssh-keys' \
-H 'Content-Type: application/json' \
-d '{
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl ada@laptop"
}'
```

```
{
"added_by": "ada@example.com",
"created_ms": 1767225600000,
"fingerprint": "SHA256:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU",
"id": "k5x2m8q1z0",
"name": "laptop",
"public_key": "string",
"type": "ssh-ed25519"
}
```

DELETE

/ssh-keys/{id}

Example Request

```
curl -X DELETE 'https://api.slashinfra.com/ssh-keys/string'
```

```
"string"
```
