Terminal and SSH
The browser terminal
Section titled “The browser terminal”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.
SSH from your own machine
Section titled “SSH from your own machine”Worth setting up if you want your editor, port forwarding, or rsync.
-
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.
-
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-servermkdir -p /run/sshd# Key-based auth only; a password on a public port is a bad trade.mkdir -p ~/.ssh && chmod 700 ~/.sshecho 'ssh-ed25519 AAAA... you@example.com' >> ~/.ssh/authorized_keyschmod 600 ~/.ssh/authorized_keys/usr/sbin/sshd -D & -
Open the port. In the detail panel’s Proxy view, open port 22 as public or private.
-
Connect to the address and port shown in the proxy table:
Terminal window ssh -p <proxy-port> root@<proxy-host>
Keeping work alive
Section titled “Keeping work alive”tmux new -s work# detach with ctrl-b then d; reattach later with:tmux attach -t workThe session survives the browser tab closing, and survives an SSH disconnect. It does not survive the job’s runtime expiring.
nohup python train.py > /homecatalog/train.log 2>&1 &Note the log going to a mounted path, so it is still there afterwards.
Set the job’s command to start your work directly. The job then needs no shell at all, and on a non-interactive queue this is the only way.
What does not survive
Section titled “What does not survive”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.