// book 8
patriola.com

Book 8 · Patriola’s Guide to Claude

SSH to the GPU


Your laptop is where you start. Not where you’re stuck.

Buy on Amazon

Patriola's Guide to Claude — SSH to the GPU: Offload the Heavy Work to Better Hardware
What this book is

Claude on the machine that can handle it

A practical guide to extending your Claude workflow to a second machine. The laptop describes the work. The remote machine executes it. Results come back when the job is done — drawn from a production setup that runs voice training, overnight batch jobs, and remote builds on demand.

The architecture is practical and unglamorous: once it’s running, you give the heavy job to the machine built for it and come back when it’s done.

What you’ll learn

Five layers, one remote workflow

  • SSH-setup — Key-based auth with ed25519: ssh-keygen -t ed25519, ssh-copy-id, and a ~/.ssh/config entry with ControlMaster auto and ControlPersist 10m to reuse the connection without re-authing. Install the Claude CLI on the remote, authenticate, and verify with a live prompt before anything else runs.
  • file-transferrsync with --checksum (not --times), --exclude='.git', --exclude='node_modules', --dry-run before the real push. Patterns for datasets (large binary, checksum verify after transfer), configs (small text, diff before overwrite), and checkpoints (incremental transfer, keep last 3 only).
  • session-persistencetmux new-session -d -s work before launching any job. tmux send-keys to start it. Disconnect with Ctrl-B D or close the laptop. Reattach from any network with tmux attach -t work. The PID is still running. The log is still growing. The job finishes without you.
  • GPU-workloads — SSH into the remote, activate the venv, launch the job inside a tmux session, tail the log in one pane and run watch -n 5 nvidia-smi in a second. VRAM headroom check before launch: nvidia-smi --query-gpu=memory.free --format=csv,noheader. Results rsync back when the job finishes.
  • remote-builds — Push source with rsync --delete, run the build with claude --no-interactive --print inside a tmux session, tail the output log over SSH, retrieve build artifacts. The same pattern handles compile-heavy targets, Docker image builds, or anything the laptop’s thermal envelope can’t finish.
  • file-transfer — rsync patterns for moving datasets and configs reliably without clobbering what’s already on the remote.
  • session-persistence — tmux keeps jobs alive after the laptop closes. The session survives the disconnect; the job finishes without you watching it.
  • GPU-workloads — Describe the job on the laptop, execute it on hardware built for it, retrieve results when it finishes. The pattern that makes overnight training runs practical.
  • remote-builds — The same pattern applied to someone else’s machine: their hardware, your Claude session, their codebase built or fixed without a screen-share.
From the book

A preview

The laptop describes the work. The remote machine does it. When the job comes back, you’ve been doing something else.
You — launching a training run Launch the voice training run on the GPU machine and tail the log.
Claude Connected to remote. Uploaded config.json and dataset checksum — both verified. Training started, PID 24819, log at ~/voice-run/train.log. CUDA 11.8 detected, batch loading clean, no import errors. Tailing now. Loss at epoch 1: 3.71.
Every pattern in this book is drawn from a real machine running real jobs. The setup is unglamorous. Once it’s running, you rarely think about it.
training-run.sh$ rsync -a --checksum --dry-run ./dataset/ gpu-box:~/voice-run/dataset/ sent 1,284 bytes · 14,200 files to check (dry run) $ ssh gpu-box "tmux new-session -d -s train 'cd ~/voice-run && python train.py --config config.json'" CUDA 11.8 detected — RTX 3090 (24,576 MiB VRAM, 22,104 MiB free) batch_size=32 · lr=3e-4 · epochs=40 · 312 steps/epoch epoch 1/40 — loss: 3.712 · val_loss: 3.891 · 00:04:22 epoch 2/40 — loss: 3.201 · val_loss: 3.445 · 00:04:18 checkpoint saved — epoch_002.pt (1.2 GB) ^C — detached (job running in tmux session “train” on gpu-box)
Who it’s for

Advanced operators whose laptop is the bottleneck

Claude users hitting the ceiling on their local hardware — thermal throttling, insufficient VRAM, or batch jobs too slow to run in the foreground. CLI-fluent; comfortable with SSH, terminal, and pip installs.

A longer excerpt is available to newsletter subscribers.

Buy on Amazon

You might also like

More from Patriola

Build a HUD Build a HUD AI Teams AI Teams Automations Automations

Browse all books →

Stay current

New books in this series

One short email per book launch.