Vast.ai API
Instances

attach ssh-key

1min
POST
https://console.vast.ai/api/v0/instances/{id}/ssh/
Production server

Attaches an SSH key to the specified instance, allowing SSH access using the provided key.

CLI Usage: vast attach instance_id ssh_key

Authentication
BearerAuth
Path Parameters
id
*
Body Parameters
body
*
ssh_key
Responses
200
SSH key attached successfully
success
msg
400
Bad Request
success
error
msg
401
Unauthorized
success
error
msg
404
Not Found
success
error
msg




Updated 06 Feb 2025
Did this page help you?