List SSH Keys
curl -X GET "https://panel.example.com/api/account/ssh-keys?page=1&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"
Retrieve a paginated list of SSH keys for the authenticated user.
Query Parameters
The page number to retrieve (minimum: 1).
Number of items per page (minimum: 1, maximum: 100).
Response
Array of SSH key objects.
The unique identifier of the SSH key.
The friendly name for the SSH key.
SHA256 fingerprint of the public key.
The full SSH public key string.
ISO 8601 timestamp of when the key was created.
Pagination metadata.
Number of items per page.
Total number of SSH keys.
{
"data": [
{
"id": "clx1a2b3c4d5e6f7g8h9i0j1",
"name": "Work Laptop",
"fingerprint": "SHA256:abc123def456ghi789jkl012mno345pqr678stu901vwx234yz",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl",
"created_at": "2024-01-15T10:30:00.000Z"
}
],
"pagination": {
"page": 1,
"perPage": 50,
"total": 1,
"totalPages": 1
}
}
Create SSH Key
curl -X POST "https://panel.example.com/api/account/ssh-keys" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Work Laptop",
"publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl [email protected]"
}'
Add a new SSH public key to the authenticated user’s account.
Request Body
A friendly name for the SSH key (maximum 255 characters).
The SSH public key string. Must be a valid SSH public key in OpenSSH format.Supported key types:
ssh-rsa
ssh-dss
ssh-ed25519
ecdsa-sha2-nistp256
ecdsa-sha2-nistp384
ecdsa-sha2-nistp521
Each account can have a maximum of 25 SSH keys.
Response
The created SSH key object.
The unique identifier of the SSH key.
The friendly name for the SSH key.
SHA256 fingerprint of the public key.
The full SSH public key string.
ISO 8601 timestamp of creation.
{
"data": {
"id": "clx1a2b3c4d5e6f7g8h9i0j1",
"name": "Work Laptop",
"fingerprint": "SHA256:abc123def456ghi789jkl012mno345pqr678stu901vwx234yz",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl",
"created_at": "2024-03-15T10:30:00.000Z"
}
}
Error Codes
Invalid SSH public key format or maximum of 25 keys exceeded.
This SSH key already exists in the system.
Delete SSH Key
curl -X DELETE "https://panel.example.com/api/account/ssh-keys/clx1a2b3c4d5e6f7g8h9i0j1" \
-H "Authorization: Bearer YOUR_API_KEY"
Delete an SSH key by its ID.
Path Parameters
The unique identifier of the SSH key to delete.
Response
Always true if the deletion was successful.
{
"success": true,
"message": "SSH key deleted successfully"
}
Error Codes
Missing SSH key ID in request.
SSH key not found or does not belong to the authenticated user.