Get SSH access to a sandbox
Returns what an SSH client needs to connect. The sandbox must have been created
with ssh: true. Otherwise this returns 404 with code: ssh_not_enabled, which
tells it apart from a sandbox that does not exist. The request has no body.
Meadow returns the vendor’s address and does not proxy SSH. Port forwarding
(ssh -L) reaches any port in the sandbox.
The response is a credential: anyone holding it can log in until expires_at.
Do not log it. Each call returns a new credential.
The vendors differ:
- Daytona. The credential is the
username, which is a token.private_keyandhost_keyare null, so a client cannot pin the server.expires_atis the token’s expiry, about one hour ahead. - Modal.
usernameisroot,private_keyis a new OpenSSH key andhost_keyis the server’s public key.portis not 22.expires_atis the sandbox’s ownexpires_at: the key works until the sandbox ends, and there is no revoke call. Meadow startssshdin the sandbox. An image withoutsshdneedsapt-getand network access to install it. Putopenssh-serverin the image when an allow list blocks the package mirror. Modal cannot serve SSH withnetwork.block_all, and is skipped at create for that combination.
A client that pins host_key must offer only that key’s algorithm. OpenSSH does
this from known_hosts.
Scope: sandboxes.
Authentication
A Meadow API key, sent as Authorization: Bearer mdw_.... The header
x-api-key: mdw_... is accepted in its place.
Path parameters
The sandbox id returned by POST /v1/sandboxes. It must belong to the key’s project.
Response headers
Meadow’s id for this request, req_ and 24 hex characters. Every response
carries it, including errors, streams and unknown routes. Every error in the
Error schema repeats it as request_id. Quote it when you report a problem.
Response
OpenSSH private key for this login. Null when the provider puts the credential
in username instead.
The server’s public host key, for known_hosts. Null when the provider gives none.