v1
latestOpenAPI 3.1.02026-07-13897404.3 KBInstances
attach ssh-key
Attaches an SSH key to the specified instance, allowing SSH access using the provided key.
CLI Usage: vastai attach ssh <instance_id> <ssh_key>
post/api/v0/instances/{id}/ssh/
Path parameters
idinteger required
ID of the instance to attach the SSH key to
Request body
Example request
{
"ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAA..."
}Response
SSH key attached successfully
Example response
{
"success": true,
"msg": "SSH key attached successfully"
}