~/.ssh/config that routes *.ssh.baseten.co connections through the CLI. After that, you can connect to a training job or a workstation with any OpenSSH tool.
Prerequisites
- SSH access enabled for your organization. Contact us to request it.
- A Baseten account.
- The Baseten CLI, logged in with
baseten auth login. Commands that run Truss through the Baseten CLI, such asbaseten train push, use these credentials. - An OpenSSH client, included with macOS and Linux. On Windows, use the OpenSSH optional feature or the Windows Subsystem for Linux (WSL).
- To use the Truss CLI instead, uv on your
PATH.
Set up your machine
- Baseten CLI
- Truss CLI
To set up SSH access:Connections authenticate with the profile pinned at setup time. To pin a different profile, pass
--profile <name>. When you authenticate with BASETEN_API_KEY instead of a stored profile, setup pins no profile and omits the Connections use profile line. Re-running setup prints Reusing existing SSH keypair instead of Generated SSH keypair and rewrites the managed config block.If you previously ran truss ssh setup, remove its block (between # --- baseten-ssh --- and # --- end baseten-ssh ---) from ~/.ssh/config first; setup refuses to touch a file that already configures *.ssh.baseten.co hosts outside its own managed block.How it works
When you connect to atraining-job-*.ssh.baseten.co hostname, the managed ~/.ssh/config block runs the CLI. The CLI calls the training job SSH signing API to issue a short-lived certificate and relays the connection to the correct job. Certificates refresh automatically on every connection.
Use multiple profiles
With the Baseten CLI, connections authenticate with the profile pinned at setup time. To pin a different profile, re-run setup with--profile <name>; to override for a single connection, set BASETEN_PROFILE:
Terminal
~/.trussrc in the hostname instead: training-job-abc1234-0.<remote>.ssh.baseten.co.
Troubleshoot setup
”no SSH keypair found; run baseten ssh setup first”
Run baseten ssh setup to configure your machine.
”already configures *.ssh.baseten.co hosts outside the managed block”
Another tool (typicallytruss ssh setup) has already added Baseten SSH entries to ~/.ssh/config. Remove them and re-run baseten ssh setup. The Truss block sits between # --- baseten-ssh --- and # --- end baseten-ssh ---.
No api_key for remote with the Truss CLI
The Truss SSH proxy reads an API key from ~/.trussrc and can’t read credentials stored in the OS keyring. To store an API key in ~/.trussrc, log in again and choose Paste an API key:
Terminal
TLS errors with the Truss CLI
The Truss proxy script requires Python 3.10 or newer and uses the newest interpreter it finds on your machine. Prefer 3.12 or newer, which still receives security updates. If you see TLS errors, re-run setup with a newer interpreter:Terminal
Certificate verification errors
Ifssh fails with a CERTIFICATE_VERIFY_FAILED error, the Python interpreter the proxy
script runs under has no SSL root certificates, so it can’t verify TLS connections to
Baseten. To fix it, either install certificates for that Python, or re-run setup pointing
at a Python that already has them:
Terminal
Terminal
ca-certificates package on Debian/Ubuntu).
Next steps
- Connect to a training job over SSH: Enable SSH on a job and open a shell in its container.
- Create a workstation: Start an SSH-ready GPU machine without writing a config.