Skip to content
Wardcase Docs

SSH access

Every sandbox accepts SSH at one endpoint, ssh.wardcase.com, on port 22. The username is the sandbox id:

Terminal window
ssh sbx_4f9k2m8q1z7x3c5v@ssh.wardcase.com

There 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.

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.

Terminal window
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:

Terminal window
ssh -i ~/.ssh/id_ed25519 sbx_4f9k2m8q1z7x3c5v@ssh.wardcase.com

For a one-off connection, mint a token for one sandbox. It works as the SSH password for 10 minutes.

Terminal window
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.
UseCommand
Interactive shellssh sbx_4f9k2m8q1z7x3c5v@ssh.wardcase.com
One commandssh sbx_4f9k2m8q1z7x3c5v@ssh.wardcase.com 'python --version'
Copy files with SFTPsftp sbx_4f9k2m8q1z7x3c5v@ssh.wardcase.com
Reach a port in the sandboxssh -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.

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]

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.

  • ssh.session.started: the session id, the authentication method (publickey or token), the kind of session (shell, exec, sftp or forward) and the key fingerprint. client_ip is the literal unavailable, 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.opened and ssh.forward.refused for port forwards.
  • file.put, file.get and file.list with source: sftp for SFTP transfers.

What you type in an interactive shell is not recorded.