Skip to main content

SSH Access

Every Rigbox workspace is a full Linux VM with SSH access. Connect from any terminal to get a shell or transfer files.

Prerequisites

Before connecting via SSH, you need:
  1. An SSH key pair on your local machine (e.g., ~/.ssh/id_ed25519)
  2. A Rigbox account with an API key
  3. At least one running workspace
If you don’t have an SSH key yet, generate one:

Register an SSH Key

To connect via SSH, you first need to register your public key with Rigbox. Replace <KEY_NAME> with a label you’ll recognize (for example, laptop).
This reads your default public key (~/.ssh/id_ed25519.pub) and registers it automatically under the name you provide. To register a key from a different path, pass --file:
You can register multiple SSH keys for different machines - for example, one for your laptop and one for your desktop. Give each a descriptive name so you can identify them later.

Sync Keys to a Workspace

When you create a workspace, your registered SSH keys are typically synced automatically. If you add a new key while a workspace is already running, sync it manually:
This copies all your registered public keys into the workspace VM’s ~/.ssh/authorized_keys file.
Keys are synced automatically on workspace start for most templates. You only need to run rig ssh sync if you add a key to an already-running workspace.

Connect to a Workspace

When you create a workspace, Rigbox gives you an SSH command in this format:
To print the exact SSH target for a workspace at any time, run:
<WORKSPACE_ID_SUFFIX> is the workspace ID with the leading ws- stripped, and <REGION> is the workspace’s region (for example, eu-west-1). For example, if your workspace is named my-project with ID ws-ctbxi8lb in the eu-west-1 region:
The examples below continue with my-project / ws-ctbxi8lb / eu-west-1. Replace those with your own workspace name, ID suffix, and region. The SSH server identifies you by your registered key and routes the connection directly to your workspace VM.
The SSH command is shown in the dashboard when you create a workspace. You can also construct it from the workspace name, ID (strip the ws- prefix), and region.

Connecting to the right region

Each workspace runs on a compute node in a specific region (today: eu-west-1), and you connect to that region’s hostname directly:
The dashboard always shows the correct region in the SSH command it generates, and rig ssh-info <workspace> from the CLI prints the same target. As Rigbox expands to more regions, the hostname will change accordingly — there is no central rigbox.dev:22 gateway to fall back on.
Older ssh <name>+rig@rigbox.dev instructions referred to a gateway router that is no longer deployed. If a third-party guide or older script still uses that format, replace it with the region-direct hostname.

Specify an identity file

If your key is not in the default location, specify it explicitly:

SSH config shortcut

Add this to your ~/.ssh/config for easier access:
Then connect with:

File Transfer

Use scp to transfer files between your local machine and a workspace.

Upload a file

Download a file

Upload a directory

Using rsync

For larger transfers or syncing directories, rsync is more efficient:

Managing SSH Keys

List your registered keys

List keys synced to a workspace

This returns the keys currently in the workspace’s authorized_keys file.

Remove a key

Removing a key with the CLI does not immediately remove it from running workspaces. The key will be removed the next time the workspace restarts or you run rig ssh sync.

Troubleshooting

Connection refused

If you get Connection refused, verify:
  1. Your workspace is running (check with rig workspace ls)
  2. Your SSH key is registered and synced
  3. You’re using the correct username format: <WORKSPACE_NAME>-<WORKSPACE_ID_SUFFIX>@<REGION>.rigbox.dev

Permission denied

If you get Permission denied (publickey):
  1. Check that your key is registered: rig ssh ls
  2. Sync keys to the workspace: rig ssh sync --workspace <WORKSPACE_ID>
  3. Verify you are using the correct identity file: ssh -v my-project-ctbxi8lb@{region}.rigbox.dev

Slow connection

If connections feel slow:
  1. Check your network connection
  2. Try connecting with -o ServerAliveInterval=60 to prevent timeouts
  3. For file transfers, prefer rsync over scp for large datasets

API Reference