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
| Type | Format |
|---|---|
| Ed25519 | ssh-ed25519 AAAA... |
| RSA | ssh-rsa AAAA... |
| ECDSA | ecdsa-sha2-nistp256 AAAA... |