Skip to main content

SSH Keys API

Manage SSH keys for accessing GPU instances.

Authentication

All endpoints require a Bearer token:

Authorization: Bearer <token>

Endpoints

Create SSH Key

Register a new SSH key.

POST /ssh-keys

Request Body:

{
"name": "my-laptop",
"publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... user@host"
}

Response:

{
"id": 1,
"name": "my-laptop",
"publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI..."
}
tip

The key is registered both locally in NeuroHash and with the GPU cloud provider. This allows the key to be used immediately when launching instances.


List SSH Keys

Get all SSH keys for the authenticated user.

GET /ssh-keys

Response:

[
{
"id": 1,
"name": "my-laptop",
"publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI..."
},
{
"id": 2,
"name": "work-desktop",
"publicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAB..."
}
]

Delete SSH Key

Delete an SSH key by ID.

DELETE /ssh-keys/:id

Response:

{
"message": "SSH key deleted successfully"
}
warning

Deleting a key removes it from the system. Existing running instances that were launched with this key will still be accessible, but new instances cannot use the deleted key.

Supported Key Types

TypeFormat
Ed25519ssh-ed25519 AAAA...
RSAssh-rsa AAAA...
ECDSAecdsa-sha2-nistp256 AAAA...