SSH access
Every sandbox accepts SSH at one endpoint, ssh.wardcase.com, on port 22. The username is the sandbox id:
ssh sbx_4f9k2m8q1z7x3c5v@ssh.wardcase.comThere is no SSH server inside the sandbox. A gateway on the host checks your credential with the control plane, then attaches to the sandbox’s container.
During early access the SSH endpoint is served by a single host, so SSH reaches sandboxes in EU West
(eu-west) only. Create a sandbox there if you need SSH. Commands, files and ports work in every
region through the API.
Sign in with a key
Section titled “Sign in with a key”Register an OpenSSH public key on your organization, in the dashboard under SSH keys or with the API. Any key registered on the organization can open any of its sandboxes.
curl https://api.wardcase.com/v1/ssh-keys \-H "Authorization: Bearer $VIVARIUM_API_KEY" \-H "Content-Type: application/json" \-d "{\"name\":\"laptop\",\"public_key\":\"$(cat ~/.ssh/id_ed25519.pub)\"}"Then connect with the matching private key:
ssh -i ~/.ssh/id_ed25519 sbx_4f9k2m8q1z7x3c5v@ssh.wardcase.comSign in with a token
Section titled “Sign in with a token”For a one-off connection, mint a token for one sandbox. It works as the SSH password for 10 minutes.
curl -X POST https://api.wardcase.com/v1/sandboxes/sbx_4f9k2m8q1z7x3c5v/ssh-token \-H "Authorization: Bearer $VIVARIUM_API_KEY"The response has username, host, port, token, expires_at and a ready command. Run the command and paste
the token when ssh asks for a password. In the SDKs, sshCommand() and ssh_command() mint the token and return the
same fields:
const ssh = await sbx.sshCommand();console.log(ssh.command); // ssh sbx_4f9k2m8q1z7x3c5v@ssh.wardcase.com// ssh.token is the password. It expires at ssh.expiresAt.ssh = sbx.ssh_command()print(ssh.command) # ssh sbx_4f9k2m8q1z7x3c5v@ssh.wardcase.com# ssh.token is the password. It expires at ssh.expires_at.What you can do
Section titled “What you can do”| Use | Command |
|---|---|
| Interactive shell | ssh sbx_4f9k2m8q1z7x3c5v@ssh.wardcase.com |
| One command | ssh sbx_4f9k2m8q1z7x3c5v@ssh.wardcase.com 'python --version' |
| Copy files with SFTP | sftp sbx_4f9k2m8q1z7x3c5v@ssh.wardcase.com |
| Reach a port in the sandbox | ssh -N -L 8000:localhost:8000 sbx_4f9k2m8q1z7x3c5v@ssh.wardcase.com |
Local forwarding (ssh -L) reaches the sandbox itself only. The destination must be localhost, 127.0.0.1, ::1 or the sandbox
id; the port after it is a port inside the sandbox. Open http://localhost:8000 on your machine to reach it. Other
destinations are refused.
Remote forwarding (ssh -R) and agent forwarding (ssh -A) are refused, and each refusal is recorded as
ssh.forward.refused.
Host key fingerprints
Section titled “Host key fingerprints”The first time you connect, ssh asks you to confirm the gateway’s host key. Compare it with these fingerprints:
[host key fingerprints are added by the deploy runbook]
Timeouts
Section titled “Timeouts”An open SSH session counts as activity, so the sandbox’s idle timeout does not fire while you are connected. The hard timeout still applies and ends the session with the sandbox.
What the audit trail records
Section titled “What the audit trail records”ssh.session.started: the session id, the authentication method (publickeyortoken), the kind of session (shell,exec,sftporforward) and the key fingerprint.client_ipis the literalunavailable, because SSH reaches the gateway through Cloudflare Spectrum, which on the current plan does not pass the client address on.ssh.session.ended: the duration and exit code.ssh.forward.openedandssh.forward.refusedfor port forwards.file.put,file.getandfile.listwithsource: sftpfor SFTP transfers.
What you type in an interactive shell is not recorded.