Remote Development from iPhone to macOS in the AI Era: Tailscale + Shellfish + tmux
In the AI era, software development is no longer confined to powerful laptops or multi-monitor setups. With tools like Claude Code and Codex CLI, developers can now build and iterate through natural conversations with AI — reducing the need for heavy local environments.
This shift also changes how and where we work. Instead of always coding at a desk, we can now connect to our development machines remotely — even from an iPhone on the go.
In this guide, I'll explore how to set up a lightweight, secure, and persistent remote development environment using Tailscale, Shellfish, and tmux — enabling you to code anywhere, seamlessly switching between your Mac and iPhone without losing your workflow.
Overview
This guide shows how to achieve the following by combining Tailscale, Shellfish, and tmux:
- Secure access to your home Mac from anywhere without port forwarding
- Work sessions that persist through disconnections and resume seamlessly
- Shared terminal sessions between iPhone and Mac
Requirements
macOS Side
- Homebrew - Package manager for macOS
- The following tools (install with Homebrew):
iPhone/iOS Device
- App Store access
- The following apps (install from App Store):
- Tailscale - VPN
- SSH client (choose from recommended apps below)
Tools Used
| Tool | Role | Problem It Solves |
|---|---|---|
| Tailscale | Peer-to-peer VPN | Secure remote access without port forwarding |
| Shellfish | SSH client | iPhone GUI operation, tap-to-connect, tmux integration |
| tmux | Session management | Work persistence across disconnections, screen sharing |
Connection Architecture
iPhone (Shellfish)
↓
Tailscale VPN (peer-to-peer connection)
↓
macOS (development machine)
├─ SSH server
└─ tmux session (persistent, multi-device sharing)
Each layer works together to provide stable remote development in mobile environments:
| Layer | Technology | Role |
|---|---|---|
| Client | Shellfish | Tap-to-connect, GUI management |
| Network | Tailscale | Secure connection, NAT traversal, fixed IP |
| Protocol | SSH | Encrypted secure connection |
| Session | tmux | Session persistence, screen sharing |
Setup Instructions
1. macOS Configuration
1.1 Installing Required Packages
Install the necessary tools using Homebrew:
# Install Tailscale (VPN)
brew install --cask tailscale-app
# Install tmux (terminal multiplexer)
brew install tmux
1.2 tmux Configuration (Recommended)
Create a tmux configuration file optimized for Claude Code and AI tools.
Save the following to ~/.tmux.conf:
# ====================================================================================
# Basic Settings - 2025 Recommended Configuration
# ====================================================================================
# Terminal Type: tmux-256color (modern recommendation, tmux 2.6+)
# Benefits over screen-256color:
# - Italics support (screen doesn't support it)
# - Better color rendering
# - Improved CJK (Japanese/Chinese/Korean) character handling
set -g default-terminal "tmux-256color"
# True Color (24-bit RGB) Support
# Modern tmux 3.2+ recommended method
set -as terminal-features ",*:RGB"
set-option -sa terminal-overrides ",tmux*:Tc"
# Enable mouse support (essential for iOS touch operations)
set -g mouse on
# Start window/pane numbering from 1 (human-friendly)
set -g base-index 1
setw -g pane-base-index 1
# Renumber windows when one is closed (no gaps)
set -g renumber-windows on
# ====================================================================================
# Claude Code / AI Tools Optimization
# ====================================================================================
# Dramatically increase scrollback buffer
# Claude Code generates verbose output requiring large buffer
# Recommended: 500000 lines (~250MB)
# Reference: Default is 2000 lines, typical usage is 50000 lines
set -g history-limit 500000
# Minimize ESC key response time (vim/neovim comfort)
# tmux 3.5 default: 10ms
set -sg escape-time 0
# Enable focus events (vim/neovim integration)
set -g focus-events on
# Extend message display time (for reviewing Claude Code output)
set -g display-time 3000
# Extend pane number display time (better usability on small screens)
set -g display-panes-time 4000
# ====================================================================================
# Key Bindings
# ====================================================================================
# vi mode key bindings (use vim keys in copy mode)
setw -g mode-keys vi
# Emacs-style status bar (matches zsh default)
set -g status-keys emacs
# ====================================================================================
# Visual Settings
# ====================================================================================
# Status bar at top (iOS keyboard won't cover it)
set -g status-position top
# Status bar color settings (simple and readable)
set -g status-style bg=black,fg=white
# Highlight current window
setw -g window-status-current-style bg=blue,fg=white,bold
Benefits of this configuration:
- Claude Code Ready1: 500000-line scrollback to fully review long outputs
- True Color2: Modern color schemes display correctly (using tmux-256color)
- CJK Character Optimized: Better Japanese/Chinese/Korean text quality
- iOS Optimized: Touch operations and keyboard position considered
1.3 Enable Remote Login
Enable macOS remote login (SSH server):
- Open System Settings
- Go to General > Sharing
- Enable Remote Login
- Select authorized users (recommended: administrators only)
1.4 Tailscale Setup
# Launch Tailscale app
open -a Tailscale
- When Tailscale launches, follow the login instructions
- Authenticate with an SSO provider (Google, GitHub, etc.)
- Once connected, note the Tailscale IP address assigned to macOS:
tailscale ip -4
Example output: 100.64.1.2
Important: This is your macOS Tailscale IP address. Save this IP for use in later steps.
Note: Tailscale automatically assigns fixed IPs in the 100.x.y.z format. This IP remains constant while the device is part of the Tailscale network.
1.5 Enable Tailscale 2FA (Recommended)
- Access the Tailscale admin console
- Navigate to Settings > Users and select your account
- Enable Two-factor authentication
2. iPhone Configuration
2.1 SSH Client Selection
Multiple SSH clients are available for iPhone/iPad. After trying several apps, I found Shellfish to be the most user-friendly. Here's my assessment as of November 2025.
Recommended: Shellfish (Secure ShellFish)3
Features:
- ✅ Excellent tmux Support: Session thumbnail previews, Handoff for seamless device switching
- ✅ Background SSH Persistence: Keeps SSH connections alive even when the app is in the background
- ✅ Files App Integration: Direct SSH server integration into iOS Files app
- ✅ iCloud Keychain Sync: Automatic server settings sync
- ✅ One-time Purchase: $29.99 for lifetime use (monthly $2.99, yearly $14.99 also available)
Why Recommended:
- Excellent tmux integration that handles Claude Code's verbose output effortlessly
- Strong long-term value with one-time purchase option
- Highly responsive developer support
Alternative 1: Blink Shell4
Features:
- ✅ Full Mosh Support: Connection maintained during network switches and even after device reboot
- ✅ Open Source: Continuous community improvements
- ✅ Blink Code: Browser-based VSCode integration
- ✅ Advanced Customization: High flexibility in themes, fonts, and layouts
- ✅ iPad Multitasking Optimized: Excellent Split Screen / Slide Over support
Price: $19.99/year (no one-time purchase option)
Best For:
- Using VSCode on mobile
- Unstable network environments (traveling, etc.) where Mosh connection persistence is essential
Alternative 2: Termius5
Features:
- ✅ Cross-platform: Syncs across Windows, macOS, Linux, iOS, and Android
- ✅ Mosh Support: Improved connection stability
- ✅ SFTP Integration: Built-in file transfer
Caveats:
- ⚠️ Claude Code Compatibility Issues: As of November 2025, scrollback problems have been reported when using AI terminal tools (e.g., Gemini CLI). The terminal may automatically scroll to the input field after long outputs, preventing you from reviewing previous content.
Price: Free tier available; Premium around $15/month
2.2 Install Required Apps
Install from the App Store:
- Tailscale - VPN connection
- Shellfish - SSH client (see recommendations above)
2.3 Tailscale Setup
- Launch the Tailscale app
- Log in with the same account used on macOS
- Once connected, you'll join the same VPN network as your Mac
2.4 Shellfish Setup
Configure SSH connection in Shellfish.
- Launch Shellfish
- Tap the + button to add a new host
- Enter the following:
- Label:
mac(any recognizable name) - Hostname:
<macOS Tailscale IP>(e.g.,100.64.1.2)- This is the IP from step 1.4 that you saved
- User:
<macOS username>- Confirm with
whoamicommand on macOS
- Confirm with
- Port:
22(SSH default)
- Label:
- Tap Save
Setup complete. Connect by tapping the host name.
3. Connection Testing
3.1 SSH Connection Test
Test the macOS connection using Shellfish.
Connection Steps:
- Open Shellfish
- Tap the
machost you created - On first connection, tap Continue or Trust in the host key dialog
- Enter your macOS user password if prompted
- You'll see the macOS terminal upon successful connection
Verification: Confirm the connection with:
hostname
If the macOS hostname appears, the connection succeeded.
3.2 Starting a tmux Session
Once connected to macOS, start or join a tmux session:
# Create a new session
tmux new -s dev
# Or join an existing session
tmux attach -t dev
Basic Usage
tmux Basic Commands
Session Management
# Create a new session
tmux new -s <session_name>
# Join an existing session
tmux attach -t <session_name>
# List sessions
tmux ls
# Temporarily detach from session (session continues)
# Ctrl+B → d
# End session
exit
Sharing Sessions Between iPhone and Mac
tmux allows you to share the same terminal session across devices.
-
Start a session (on either device):
Connect to macOS and create a tmux session:
tmux new -s dev -
Join from the other device:
- iPhone: Tap the
machost in your SSH client (Shellfish/Blink Shell) - Mac: Use
ssh <Tailscale IP>ormosh <Tailscale IP>in Terminal
After connecting, join the session:
tmux attach -t dev - iPhone: Tap the
-
Synchronized screens:
Any input from either device appears immediately on both screens. This enables starting work on iPhone and continuing on Mac, or vice versa.
Useful tmux Features
The configuration above enables:
- Mouse support: Touch-based pane selection
- vi key bindings: vim keys in scroll mode
- Automatic renumbering: Window numbers compress when closed
- No ESC delay: Eliminates vim usage delays
Customize by adding configurations to ~/.tmux.conf as needed.
Troubleshooting
Tailscale Can't Find macOS
Cause: Different accounts on devices, or connection not established
Solution:
- Verify both devices use the same Tailscale account
- Check macOS Tailscale connection:
tailscale status - Verify macOS remote login is enabled
- Check iPhone Tailscale app connection status
SSH "Permission denied" Error
Cause: Remote login disabled, or user permission issues
Solution:
- Verify macOS remote login is enabled:
- System Settings > General > Sharing > Remote Login
- Verify correct username:
# Check current username on macOS whoami
tmux Session Not Found
Cause: Session not created, or incorrect session name
Solution:
- Check existing sessions:
tmux ls - Create new session if none exist:
tmux new -s dev
Advanced: VS Code on Browser
code-server Setup
To use VS Code in iPhone Safari:
# Install code-server on macOS
brew install code-server
# Start code-server
code-server
# Access from iPhone Safari:
# http://<Tailscale IP>:8080
Find the password in ~/.config/code-server/config.yaml.
Summary
You've now built a remote development environment that embodies the AI era of coding — mobile, connected, and resilient.
This setup isn't just about convenience; it represents a fundamental shift in how developers work. By combining Tailscale's secure networking, Shellfish's background SSH persistence, and tmux's session sharing, you can collaborate with AI tools or teammates from anywhere — all through your pocket-sized device.
AI-assisted coding and mobile-first workflows are redefining productivity. Whether you're debugging during your commute, monitoring builds from a café, or quickly deploying fixes from your iPhone, this setup lets you stay in flow — the way modern development was meant to be.
Disclaimer: The information in this article is current as of November 2025. Software updates and specification changes may make some content outdated. Please refer to each tool's official documentation for the latest information.
Footnotes
-
Brian P. Hogan "Working with Claude Code" (June 2025) - Recommendation: "big scrollback buffer" for Claude Code | Related: pchalasani/claude-code-tools - Claude Code + tmux integration tools | ooloth/dotfiles - Practical dotfiles for Claude Code ↩
-
Terminal Type Configuration: The tmux-256color vs screen-256color debate is widely discussed in the community. Multiple forums including Unix & Linux Stack Exchange and Stack Overflow recommend tmux-256color for modern terminals. ↩
-
Shellfish (Secure ShellFish): App Store | Official Site | MacStories "Secure ShellFish Review" (2019) | 2025 Update: DECSLRM support for improved tmux compatibility ↩
-
Blink Shell: App Store | Official Site | GitHub | Open source, top developer tool on AppStore for 5+ years ↩
-
Termius: App Store | Official Site | Note (Nov 2025): Scrollback issues reported with AI terminal tools - GitHub Issue: google-gemini/gemini-cli #10349 ↩
