I wanted to use Claude Code from my phone. The problem? Claude Code is a terminal application, and iOS doesn't have a real terminal. The solution turned out to be simpler than I expected: SSH into my Mac from my phone using Termius and Tailscale.
This setup gives me full access to Claude Code from anywhere - on the train, in bed, between meetings. The initial setup takes about 15 minutes and just works once configured.
The setup uses three simple tools that work together without custom integration. Your Mac runs Claude Code, Tailscale creates a private network between your devices, Termius gives you a terminal on iOS, and SSH handles the connection.
No port forwarding, no complex firewall rules, no exposing your computer to the internet. Tailscale handles all of that automatically.
First, install Tailscale on both your Mac and iPhone. This creates a private mesh network between your devices with persistent IP addresses.
On your Mac:
brew install tailscale
On your iPhone, download Tailscale from the App Store. Sign in with the same account on both devices. Once connected, each device gets a permanent IP address like 100.x.x.x that works even when you switch WiFi networks or move between cellular and WiFi.
Your Mac needs to accept SSH connections. Go to System Settings → General → Sharing, then enable Remote Login. Make sure your user account is allowed to connect.
You can verify SSH is running:
sudo systemsetup -getremotelogin
It should say "Remote Login: On".
Download Termius from the App Store. It's the best SSH client I've found for iOS - clean interface, good keyboard, and reliable connection handling.
In Termius, create a new host:
Save it, then connect. You should be dropped into a terminal on your Mac.
If you haven't already, install Claude Code on your Mac:
npm install -g @anthropics/claude-code
Now from your iPhone via Termius, you can just run:
claude
And you're coding with Claude from your phone. The actual compute happens on your Mac (which makes API calls to Anthropic), but you're controlling everything from iOS.
I use this mostly for quick coding tasks when I'm away from my desk. Simple scripts, file conversions, data analysis, or just exploring ideas with Claude. The limiting factor is the phone keyboard, not the technology.
The connection is surprisingly stable. Tailscale handles network transitions smoothly - if I start on WiFi and switch to cellular, the SSH session stays alive. Sometimes there's a brief pause, but it reconnects automatically.
If you want sessions that survive disconnections, install tmux on your Mac:
brew install tmux
Then when you SSH in, start a tmux session:
tmux new -s claude
If you disconnect, your Claude Code session keeps running. When you reconnect, just attach:
tmux attach -t claude
You pick up exactly where you left off.
This setup works because each tool does one thing well. Tailscale handles networking and makes your devices feel like they're on the same local network. Termius provides a solid mobile terminal experience. SSH is SSH - reliable, simple, universal. Claude Code just needs a terminal.
No custom apps, no complicated configuration, no monthly subscriptions beyond Tailscale (which has a generous free tier). It's just standard Unix tools working together the way they were designed to.
Total setup time? About 15 minutes. And it's worked flawlessly since I configured it.