Copy pageSign up

SSH and terminals

Connect interactive shells, use persistent terminals, and access a sandbox with OpenSSH.

Adria opens an SSH shell after the Session is ready. Your terminal runs locally; commands in that shell run in the remote repository.

Connect to a sandbox

Local:

cube connect feature/payments

Use the Session UUID from cube sessions outside a repository or when branch names are ambiguous. connect resumes a paused Session before opening its shell.

Type exit in the remote shell to return to your local computer. Leaving the shell does not pause the VM.

Use several terminals

Run cube connect in another local terminal to open a separate shell in the same sandbox. Both shells share files and services. For tasks that should edit code independently, use separate sandboxes.

Adria detects supported terminal integrations automatically. To stay in the current terminal explicitly:

cube connect feature/payments --terminal current

Disconnect and reconnect

Ordinary interactive shells can recover from a temporary SSH interruption while the VM keeps running. Keep the local pane open for automatic recovery. Closing the pane does not automatically reattach that terminal on a later launch.

For a terminal you can deliberately detach and return to by name:

cube connect feature/payments --tmux work

Detach with Ctrl+B, then D, and run the same command to reattach. Two panes using the same tmux name share that terminal. Distinct names give separate terminals. A pause stops these processes even though the disk is preserved.

Use standard OpenSSH tools

Adria can export a temporary SSH configuration. Local: replace YOUR_SESSION_UUID with the UUID from cube sessions:

session=YOUR_SESSION_UUID
config=$(cube connect "$session" --ssh-config)
ssh -F "$config" "cube-$session"

The CLI prints only the config path to stdout. That file uses a cube-<uuid> host alias and references the private key and trusted host key. The access grant expires after five minutes; generate another config for new connections after that. The files share a private temporary directory you can remove when done.

Use this configuration with scp and sftp for file transfers. For a single command, cube connect --command handles temporary access for you; see Commands and processes.

On this page