Authorize an SSH key
POST
Authorize your public key on the running machine and get the command to connect. You log in as its user, which has passwordless sudo. The address changes after a stop and resume: call this again then. Not available with test-mode keys.
Authorization
AuthorizationheaderrequiredBearer YOUR_API_KEY. Create a key in the dashboard.
Path parameters
sandboxIdstringrequiredSandbox ID.
Body
application/json
publicKeystringrequiredAn OpenSSH public key: the one line in your
.pubfile. A private key is refused with400.
Responses
200Authorized.
sshobjectrequired3 properties
hoststringrequiredThe machine's address. It changes after a stop and resume: authorize the key again then.
userstringrequiredcommandstringrequiredReady to paste.
400Not an OpenSSH public key (a private key is refused), or a test-mode key.
codestringrequiredmessagestringrequireddetailsobject
401Unauthorized.
codestringrequiredmessagestringrequireddetailsobject
404Sandbox not found, or it belongs to another project.
codestringrequiredmessagestringrequireddetailsobject
409`sandbox_not_running`: the sandbox must be running for this. Resume it first.
codestringrequiredmessagestringrequireddetailsobject