Skip to main content
Version: 1.0.3

SSH Keys

SSH keys are used to securely access your instances. This section covers API endpoints for managing SSH keys.

List SSH Keys​

Retrieves the list of SSH keys associated with your account.

GET /ssh-keys

Response

  • 200: Successful response
{
"data": [
{
"id": "string",
"name": "string",
"public_key": "string",
}
]
}
  • 401: Unauthorized
  • 403: Forbidden

Add SSH Key​

Adds a new SSH key or generates a new key pair.

POST /ssh-keys

Request Body

{
"name": "string"
}

Response

  • 200: Successful response
{
"data": [
{
"id": "string",
"name": "string",
"public_key": "string",
}
]
}
  • 400: Bad Request
  • 401: Unauthorized
  • 403: Forbidden

Delete SSH Key​

Deletes an SSH key from your account.

DELETE /ssh-keys/[id]

Parameters

id (path): The unique identifier (ID) of the SSH key

Response

  • 200: Successful response (no content returned)
  • 400: Bad Request
  • 401: Unauthorized
  • 403: Forbidden

Best Practices​

  • The private_key is only returned when generating a new key pair and should be stored securely.
  • Use descriptive names for your SSH keys to easily identify them
  • Never share your private keys
  • Regularly rotate your SSH keys for enhanced security
  • Use different SSH keys for different environments or projects