cURL
curl --request GET \ --url https://console.vast.ai/api/v0/instances/{instance_id}/ssh/ \ --header 'Authorization: Bearer <token>'
{ "success": true, "ssh_keys": "[{\"id\": 1, \"name\": \"my-key\", \"public_key\": \"ssh-rsa AAAA...\"}]" }
Retrieves the SSH keys associated with a specific instance.
CLI Usage: vastai show ssh-keys <instance_id>
vastai show ssh-keys <instance_id>
API key must be provided in the Authorization header
The ID of the instance to retrieve SSH keys for.
Success response with SSH keys
true
JSON string containing array of SSH key objects
"[{\"id\": 1, \"name\": \"my-key\", \"public_key\": \"ssh-rsa AAAA...\"}]"