Connecting
Use a machine from the dashboard terminal, the Stashbase CLI or plain SSH
All three ways connect to the same machine, and by default to the same shared tmux session, so you can start an agent in the dashboard and pick it up later from the CLI or your phone.
Dashboard terminal
Open a machine under Agents → Machines and click Connect.
- tmux windows as tabs. Each tmux window appears as a tab above the terminal, named after what runs in it. Click a tab to switch, + to open a window, and double-click a tab to rename it.
- Agent notifications. When an agent finishes or needs your input while the tab is in the background, the tab title flashes. Turn on the bell in the terminal header to also get a desktop notification.
- Font size. Cmd/Ctrl + and - change it, Cmd/Ctrl 0 resets it. The size is remembered in your browser.
- Links in the output open in a new tab.
Closing the tab does not stop anything: the tmux session and the agents in it keep running. tmux basics: Ctrl+b then % or " splits the screen, Ctrl+b then [ and ? searches the history.
Stashbase CLI
stashbase vms connect # pick a machine (or create one) and attach to its tmux session
stashbase vms connect vm_abc123 # a specific machine
stashbase vms connect --no-tmux # a plain shell instead of tmux
stashbase vms connect vm_abc123 --forward 3000 # also open the machine's port 3000 on localhost:3000The CLI resumes or starts the machine first, then connects with a short-lived certificate: there is no key to set up. See stashbase vms for every command.
SSH
Add your public key to the machine under SSH keys in the dashboard, then connect as agent:
ssh agent@<identifier>.vm.stashbase.devEach machine has a stable name that keeps pointing at it after it suspends, stops or starts again, so you can save it in ~/.ssh/config. The dashboard shows the exact command.
From your phone
SSH apps such as Termius or Blink work too: create a key in the app, add its public key to the
machine, and connect to the same name as agent.
Run tmux new-session -A -s main after connecting to join the shared session.
Dev servers and other ports
Ports on a machine are not open to the internet. To open a dev server, a preview or a database from your own computer, forward the port while you are connected:
stashbase vms connect vm_abc123 --forward 3000Start the server on the machine as usual (for example npm run dev in the tmux session) and open http://localhost:3000 in your browser. Hot reload works, since it is the same port.
- A different local port.
--forward 8080:3000opens the machine's port 3000 on your port 8080, useful when 3000 is already taken on your computer. - Several ports. Repeat the flag:
--forward 3000 --forward 5432. - Only you can reach it. The port listens on
localhostof your computer only, not on your network, and the traffic goes through the encrypted SSH connection. - For as long as you are connected. Detaching from tmux or losing the connection closes the forward; connecting again opens it again. The server itself keeps running on the machine.
- Using it keeps the machine awake. Traffic through a forward, such as loading pages or API calls, counts as activity. A forward that is open but unused does not, so a forgotten connection still lets the machine suspend; the forward then closes, and connecting again resumes the machine. To keep it running while you are connected but not using it, add
--keep-awake. - It counts as traffic. What the server sends back to you through the forward counts toward the workspace's included traffic.
If the local port is already in use, connect stops with an error instead of connecting without the forward.
With plain SSH, ssh -L 3000:localhost:3000 agent@<identifier>.vm.stashbase.dev does the same; -L 8080:localhost:3000 uses a different local port. Add -N to only forward, without a shell. Editors that connect over SSH, such as VS Code Remote-SSH, forward ports for you. The same rules apply either way.
Only forwards from your computer to ports on the machine itself are allowed. Forwarding from the machine back to your computer (ssh -R) or through the machine to other hosts is turned off.
Copy files
Copy files to and from a machine with the CLI, using the same login as connect:
stashbase vms cp ./notes.md :notes.md # to your machine's home directory
stashbase vms cp -r :project/dist ./dist # a folder back to this computer:path asks which machine to use; name one directly as vm_abc123:path. See stashbase vms cp. With plain SSH, scp and sftp work as usual.
GitHub and other credentials
Log in on the machine as you would on any server:
gh auth login # also sets up git over HTTPSThe token is saved on the machine only, in a file only you can read (machines have no desktop keyring, so gh warns that it is stored in plain text). It stays across suspend, stop and archive, and is deleted with the machine. Prefer a fine-grained token limited to the repositories you need.
For other secrets, use stashbase on the machine to pull them from your workspace instead of copying them over.