Claude Code on your iPhone with Tailscale, tmux and an SSH app
Last updated 27 October 2026
What you need.
| Piece | On your computer | On your iPhone |
|---|---|---|
| Tailscale | Tailscale, signed in: the app on a Mac, sudo tailscale up on Linux | The Tailscale app, same account |
| SSH | Remote Login on a Mac, the SSH server on Linux | An SSH app: Termius, Blink or another |
| tmux | brew install tmux or sudo apt install tmux | Nothing |
| Claude Code | claude, running inside tmux | Nothing |
Tailscale works through firewalls and NAT, so you don’t forward a port on your router. Sources: What is Tailscale, Tailscale CLI, Tailscale on iOS, Tailscale on macOS, checked on 27 October 2026.
Set it up.
Install Tailscale on your computer and your iPhone and sign in with the same account. With MagicDNS, on by default in tailnets created since October 2022, your computer gets a name such as
mac-mini, ormac-mini.in full. On a Mac, click the Tailscale icon in the menu bar to see itsyak-bebop. ts. net 100.address; the Machines page of the Tailscale admin console lists it too. On Linux, run:tailscale ip -4Turn on SSH. On a Mac: System Settings → General → Sharing, then turn on Remote Login and choose who may log in. On Ubuntu or Debian:
sudo apt install openssh-serverIn your SSH app, add a host with the MagicDNS name and your user name, then make a key for it. In Termius on iPhone: Keychain → + → Generate Key, then tap the key, choose the host and tap Export. It adds the public key to
~/.ssh/on your computer. Blink has its own key manager.authorized_keys At your desk, start Claude Code in a named tmux session.
-Aattaches to the session if it already exists:tmux new -A -s mainThen run
claudein it.On your iPhone, connect to the host and run the same command. You land in the session Claude is working in. Detach with Ctrl-b then d; the session keeps running.
tmux new -A -s main
Sources: Remote Login on Mac, MagicDNS, Tailscale addresses, Termius keys, tmux manual, checked on 27 October 2026.
Make it nicer on a phone.
Mosh for a connection that drops.
Mosh keeps the session through a change of network or a dead spot, and on a slow link shows your typing before the computer answers. It logs in over SSH, then uses a UDP port between 60000 and 61000, which Tailscale carries. Install it on the computer (
brew install moshon a Mac) and turn on Use Mosh for the host in Termius, or runmoshin Blink. Mosh only keeps what’s on screen, so scroll back in tmux.On a Mac, Mosh doesn’t find a Homebrew
mosh-serveron its own. Give the full path: in Termius, as the Mosh command,/opt/homebrew/bin/mosh-server new -s -l LANG=en_US.UTF-8and in Blink,
mosh --server=/.opt/ homebrew/ bin/ mosh-server mac-mini Scroll with your finger.
tmux ignores touch scrolling until you turn the mouse on. Add this line to
~/.tmux.conf:set -g mouse onWindow size.
With your phone and your desk attached to the same session, tmux sizes the window to whichever you typed in last (the default since tmux 3.1). Back at your desk, press a key and the window grows again.
Claude Code inside tmux.
For a new line in a message, use Ctrl+J from your SSH app’s extra keys. On a hardware keyboard in tmux, Shift+Enter sends the message, unless you apply Claude Code’s tmux settings.
Tailscale SSH, on Linux.
On a Linux machine,
sudo tailscale set --sshlets Tailscale handle the login, so you don’t manage keys. With the default access rules, the first connection, and again later, asks you to confirm in a browser. A Mac with the App Store or standalone Tailscale app can’t be a Tailscale SSH server, so use Remote Login there.
Sources: Mosh, Termius hosts, Blink with Tailscale and Mosh, Tailscale SSH, checked on 27 October 2026.
Where this setup stops.
Claude Code stops whenever it needs permission or has a question, and nothing on your phone tells you. The session waits until you look. To know that, you open the SSH app, connect, attach and read the screen. iOS stops an app’s background activity within about 20 to 30 seconds, Termius notes, so each check usually starts with a reconnect.
Answering means typing in a terminal on a phone keyboard. With several sessions, you switch between them with tmux keys to see which one is waiting.
A Claude Code hook can send a push when an agent stops: Claude Code notifications on your iPhone compares the ways to do it.
Add Hoptail on top.
Hoptail uses the Tailscale network and the tmux sessions you already have. Your iPhone talks to a small program on your computer, the Hoptail daemon, over your tailnet, without SSH. Keep your SSH app and its keys for everything else you do in a shell.
Hoptail needs a Mac with Apple silicon and macOS 15 or later, or a 64-bit Linux with systemd, and an iPhone with iOS 26. Install it with Homebrew. On Linux you can also install it from the release archive.
brew install hoptail-app/tap/hoptailRun setup. It checks tmux, Tailscale and Claude Code and adds Hoptail’s hooks. It doesn’t install or upgrade tmux, so your running sessions stay as they are.
hoptail setupPair your iPhone. Run this and scan the QR code with the Hoptail app.
hoptail pair
Your tmux sessions show up in the app, with the agents that are working and the ones that are waiting. When an agent needs permission, has a question or is done, your iPhone gets a notification; Allow or Deny right from it, and open the real terminal with one tap.
Full setup guide for Mac → For Linux →Troubleshooting
- The SSH app can’t reach the host? Check that Tailscale is on and signed in to the same account on both devices. Try the computer’s
100.address instead of the name. - Permission denied on a Mac? In Remote Login, check that your user is allowed, and that the public key is in
~/.ssh/of that user.authorized_keys - The session is gone after you reconnect? Run
tmux ls. If Claude wasn’t started inside tmux, it ended with the SSH connection; start it in tmux next time. - Mosh won’t connect?
mosh-serverhas to be installed on the computer and found without a login shell. On a Mac, give its full path as above. - Nothing answers away from home? Your computer needs to be awake and connected to Tailscale.
FAQ
Do I need to open a port on my router?
No. Tailscale works through firewalls and NAT without port forwarding, from home Wi-Fi or mobile data.
Termius or Blink?
Both do SSH and Mosh. Termius has a free plan with Mosh included. Blink is a subscription with a free trial. Use the one whose keyboard you like.
Does Hoptail replace my SSH app?
For Claude Code in tmux, Hoptail shows which agent waits, lets you answer it and opens its terminal. Keep the SSH app for other machines and for anything outside tmux.
Is Hoptail free?
Yes, during the beta. You’ll need your own Claude Code and Tailscale accounts.
Product details reflect publicly available information on the date shown. Product names are trademarks of their owners. Hoptail isn’t affiliated with them. Spotted a mistake? Email feedback@hoptail.app.