Skip to main content

SSH keys (Compute API)

The account's SSH public keys. A key passed at launch (ssh_public_key) is authorized on that instance and saved here for reuse, deduplicated by fingerprint; the console's launch form offers these to pick from. This endpoint lets you manage the list directly.

Prerequisites and shared rules are on the overview.

Endpoints​

MethodPathWhat it does
GET/ssh-keysThe account's keys
POST/ssh-keysAdd a key
DELETE/ssh-keys/{id}Remove a key
KEY="eco_YOUR_KEY"; API="https://api.ecohash.com"

curl -s -X POST $API/ssh-keys -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d "{ \"name\": \"laptop\", \"public_key\": \"$(cat ~/.ssh/id_ed25519.pub)\" }"
# → 201 {"id": 52, "name": "laptop", "fingerprint": "SHA256:…", "public_key": "ssh-ed25519 …", "created_at": "…"}
# (DELETE returns 204)

curl -s $API/ssh-keys -H "Authorization: Bearer $KEY"
curl -s -X DELETE $API/ssh-keys/52 -H "Authorization: Bearer $KEY"

public_key is one OpenSSH public key line (ssh-ed25519 … or ssh-rsa …). Removing a key here does not revoke it from instances already running with it; it only stops it being offered for new launches.

To actually use a key on an instance, pass it at launch — see GPU instances → SSH and SSH access.

Your privacy choices

Essential cookies are always on. You can change these choices at any time.