Skip to content

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

Resource, request and plan limits are listed on Limits.

Download OpenAPI specification · Version 0.1.0

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
  1. 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 Response
[  {    "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

  1. body
name?string

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

Length1 <= 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
  1. 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 Response
{  "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.

Length1 <= length

Response Body

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

response?stringtext/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 Response
"string"