Skip to content

Terminal and SSH

User

The fastest way in. Open the job’s detail panel and choose Terminal in the header, or use the Terminal toggle at the bottom of the navigation to open the drawer.

You are root inside your container. The terminal is only available while the job is running - on any other state the action is disabled.

Worth setting up if you want your editor, port forwarding, or rsync.

  1. Expose port 22 when you create the job. Ports cannot be added afterwards - only opened and closed. If you forgot, clone the job and add it.

  2. Run an SSH server inside the container. Most images do not have one. From the browser terminal:

    Terminal window
    apt-get update && apt-get install -y openssh-server
    mkdir -p /run/sshd
    # Key-based auth only; a password on a public port is a bad trade.
    mkdir -p ~/.ssh && chmod 700 ~/.ssh
    echo 'ssh-ed25519 AAAA... you@example.com' >> ~/.ssh/authorized_keys
    chmod 600 ~/.ssh/authorized_keys
    /usr/sbin/sshd -D &
  3. Open the port. In the detail panel’s Proxy view, open port 22 as public or private.

  4. Connect to the address and port shown in the proxy table:

    Terminal window
    ssh -p <proxy-port> root@<proxy-host>
Terminal window
tmux new -s work
# detach with ctrl-b then d; reattach later with:
tmux attach -t work

The session survives the browser tab closing, and survives an SSH disconnect. It does not survive the job’s runtime expiring.

Nothing outside a mounted folder. Not your shell history, not your installed packages, not your checkpoints. If a container is precious, the answer is to bake it into an image, not to keep the job alive.