How to reach a sandbox by SSH
The cell's SSH endpoint (`ssh.{cell}.{domain}`, port 22, one host key per cell), the login (the sandbox's id; `{id}+{user}` runs as that user) and a command line that connects.
The cell's SSH endpoint (ssh.{cell}.{domain}, port 22, one host key per cell), the login (the sandbox's id; {id}+{user} runs as that user) and a command line that connects. Signing in takes an SSH key the person added to their account (addSshKey) and a role that holds sandboxes:exec in the sandbox's project; no SSH server or key is needed in the sandbox, so every image works, VS Code and Cursor Remote-SSH included. Commands, shells, sftp, ssh -L and ssh -R to the sandbox's own loopback work; password sign-in, agent and X11 forwarding do not. An API key reads it, but no API key signs in.
A key with the sandboxes:read scope.
Request
curl "https://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/ssh" \
-H "Authorization: Bearer $POD_API_KEY"Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
sandbox_id | path | string | Yes |
Answer
200. The sandbox's SSH endpoint.
{
"host": "example",
"port": 1,
"user": "example",
"command": "example"
}| Field | Type | Always | What it is |
|---|---|---|---|
host | string | Yes | The cell's SSH endpoint, ssh.{cell}.{domain}. |
port | integer | Yes | From 1 to 65535. |
user | string | Yes | The login: the sandbox's id; {id}+{user} runs as that user. |
command | string | Yes | A command line that connects, such as ssh sbx_…@ssh.c7k.pod.example. |
Errors
The refusals this call is known for: not_found, in_other_cell. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.
In the SDKs
| Client | Call |
|---|---|
| TypeScript | pod.ports.ssh(sandboxId) |
| Python | pod.ports.ssh(sandbox_id) |