SSH Keys

Create a SSH Key

Use this endpoint to add new SSH keys, especially when integrating new developers or setting up new instances that require secure access.

Use descriptive names for your keys to easily manage multiple SSH credentials.

post
Header parameters
x-api-keystringRequired

The API Key secret should be sent through this header to authenticate the request.

Body
namestringRequiredExample: my-ssh-key
publicKeystringRequiredExample: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDHRbO3HkzPmp65PR...fAn7Jlb8b61BFh6k= cloud@sesterce
Responses
201
Return the created ssh key
application/json
post
POST /gpu-cloud/ssh-keys HTTP/1.1
Host: 
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 125

{
  "name": "my-ssh-key",
  "publicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDHRbO3HkzPmp65PR...fAn7Jlb8b61BFh6k= cloud@sesterce"
}
{
  "_id": "668f9d8df664e3c028ce5de9",
  "user": "668f9d8df664e3c028ce5de9",
  "name": "ssh-key-name",
  "publicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDHRbO3HkzPmp65PR...fAn7Jlb8b61BFh6k= cloud@sesterce",
  "isDefault": false,
  "createdAt": "2024-10-16T16:05:11.439Z",
  "updatedAt": "2024-11-15T12:46:12.327Z"
}

Retrieve the list of SSH Keys created

Access this endpoint to manage your SSH keys, which is essential for securing access to your instances and maintaining a safe environment.

get
Header parameters
x-api-keystringRequired

The API Key secret should be sent through this header to authenticate the request.

Responses
200
Returns the list of user ssh keys
application/json
get
GET /gpu-cloud/ssh-keys HTTP/1.1
Host: 
x-api-key: text
Accept: */*
[
  {
    "_id": "668f9d8df664e3c028ce5de9",
    "user": "668f9d8df664e3c028ce5de9",
    "name": "ssh-key-name",
    "publicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDHRbO3HkzPmp65PR...fAn7Jlb8b61BFh6k= cloud@sesterce",
    "isDefault": false,
    "createdAt": "2024-10-16T16:05:11.439Z",
    "updatedAt": "2024-11-15T12:46:12.327Z"
  }
]

Mark a SSH Key as default

This endpoint is handy when you want to change the default SSH key for your connections, for example, during regular key rotation for security reasons.

patch
Path parameters
idstringRequired
Header parameters
x-api-keystringRequired

The API Key secret should be sent through this header to authenticate the request.

Responses
204
SSH key marked as default
patch
PATCH /gpu-cloud/ssh-keys/{id}/makedefault HTTP/1.1
Host: 
x-api-key: text
Accept: */*

No content

Delete a SSH Key

Use this endpoint to clean up and remove obsolete or compromised SSH keys to maintain the security of your environment.

Regularly review and clean up unused SSH keys to maintain security.

delete
Path parameters
idstringRequired
Header parameters
x-api-keystringRequired

The API Key secret should be sent through this header to authenticate the request.

Responses
204
SSH key deleted successfully
delete
DELETE /gpu-cloud/ssh-keys/{id} HTTP/1.1
Host: 
x-api-key: text
Accept: */*

No content

Last updated

Was this helpful?