This guide shows a resilient SSH workflow for mobile connections using mosh + tmux. It keeps sessions alive when your network drops or your phone sleeps.
Replace mihai and the example host below with your own username and machine.
ssh mihai@100.64.0.42
mosh mihai@100.64.0.42
mosh --ssh="ssh -p 2222" mihai@100.64.0.42ssh mihai@beeperclaw.tailnet.example
mosh mihai@beeperclaw.tailnet.example
mosh --ssh="ssh -p 2222" mihai@beeperclaw.tailnet.exampleMoshi: best fit if you want nativemoshon iOS.Termius: good SSH client for quick access; pair it withtmuxif you do not needmosh.
Termux: install the tools locally, then run the same commands as above.
pkg update
pkg install -y mosh openssh tmuxmacOS:
brew install mosh tmuxUbuntu/Debian:
sudo apt-get update && sudo apt-get install -y mosh tmuxReplace your-host with a Headscale IP or MagicDNS name.
mosh your-user@your-hostIf your SSH server uses a non-default port:
mosh --ssh="ssh -p 2222" your-user@your-hostStart a named session:
tmux new -s beeperclawDetach:
tmux detachReattach later:
tmux attach -t beeperclaw- mosh survives network changes (Wi-Fi to cellular).
- tmux keeps your session alive across disconnects.
- Together, you can resume long-running tasks safely.