SSH access

Connect to any of your VMs with inferenceai ssh <vm-name>. The CLI handles auth, cert signing, refresh, and the websocket tunnel. No SSH key to generate or upload yourself.

One-time setup is two commands; after that, inferenceai ssh works from any device you've signed in on.

1. Install the CLI

bash
curl -fsSL agents.inference.ai/cli | sh

Drops the inferenceai binary in /usr/local/bin. macOS and Linux, Intel or Arm. Re-run anytime to upgrade.

2. Log in

bash
inferenceai login

Opens a browser window against auth.inference.ai. Approve the device and the CLI stores a bearer token at ~/.config/inferenceai/credentials (mode 0600). Run inferenceai logout to revoke it locally.

3. Connect to your VM

bash
inferenceai ssh <vm-name>

That's it. The CLI signs a short-lived SSH cert, opens the websocket tunnel, and drops you into the VM. Find your VM names on the dashboard or with inferenceai status. If you only have one VM, the name is optional.


Advanced: VS Code, scp, rsync

For anything that reads ~/.ssh/config (VS Code Remote-SSH, Cursor, scp, rsync), add one block per VM. Replace vm-xxxxxxxx with your VM name.

sshconfig
Host vm-xxxxxxxx.exe.xyz
  Match exec "inferenceai refresh-cert --vm vm-xxxxxxxx"
  User root
  IdentityFile ~/.config/inferenceai/id_ed25519
  CertificateFile ~/.config/inferenceai/vm-xxxxxxxx-cert.pub
  IdentitiesOnly yes
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  ProxyCommand inferenceai ssh-tunnel %h

Then connect:

bash
ssh vm-xxxxxxxx.exe.xyz
code --remote ssh-remote+vm-xxxxxxxx.exe.xyz /workspace
scp local.txt vm-xxxxxxxx.exe.xyz:/workspace/

The Match exec line refreshes the SSH cert on every connection if it's near expiry. No manual cert juggling.

How it works

Every VM has its own short-lived cert at ~/.config/inferenceai/<vm-name>-cert.pub, signed by our SSH CA. The private key (id_ed25519) is shared across VMs; the cert is what decides which VM the key works on.

If you destroy a VM and create a new one, the old cert file becomes inert. Leave it or delete it, it doesn't affect anything else.