Remote Mac terminals with Tailscale, tmux, and Prompt
Prepared October 21, 2026. Assumes a Mac and an iPhone or iPad. These are instructions; no software or system settings have been changed.
Tailscale connects your devices privately. SSH logs you into your Mac. tmux keeps your terminal work running between connections. Prompt is the phone interface.
-
Install Tailscale on both devices.
On your Mac, install the recommended standalone app from Tailscale’s macOS instructions. On your phone, install Tailscale for iOS. Sign into the same account and approve the VPN configuration on each device. Keep both connected. In Tailscale’s device list, find your Mac and copy its Tailscale IPv4 address, which starts with
100.. -
Enable SSH on your Mac.
Open System Settings → General → Sharing → Remote Login. Enable it and restrict access to your own user account. In Terminal, run
whoamito obtain the exact username for Prompt. Your Mac login password will be used for the initial connection. Full disk access is not required just to enable SSH; grant it only if your work needs protected files. Apple instructionsThis setup uses ordinary macOS SSH over Tailscale. You do not need to enable the separate “Tailscale SSH” feature, configure an exit node, or forward a router port. Remote Login may also be reachable on your local network; Tailscale does not automatically restrict the SSH server to Tailscale connections. SSH over Tailscale
-
Install tmux on your Mac.
In Terminal, run:
brew install tmux tmux -VIf
brewis unavailable, install Homebrew first and follow its printed shell setup instructions. tmux installation guide -
Start a persistent work session.
In your Mac’s Terminal, run:
tmux new-session -A -s workThis creates a session called
work, or attaches to it if it already exists. Start the commands you want to revisit inside this session. Detach by pressing Control+B, releasing both keys, then pressing D. The session continues running. tmux manual -
Configure Prompt on your phone.
Install Prompt. Create a server with protocol SSH, name My Mac, address your Mac’s Tailscale IP, port 22, and the username from
whoami. Enter your Mac password, or leave it blank to enter it when connecting. Save and connect. Review the host-key trust prompt on your first connection. Prompt setup -
Attach to the same session from Prompt.
After connecting, run:
tmux new-session -A -s workYou should see the session you started on your Mac. Once this works, put that command in the saved connection’s Server Settings → Startup Command to attach automatically on future connections. If Prompt cannot find tmux, run
command -v tmuxon your Mac and replacetmuxin the startup command with that full path. Prompt startup command -
Keep the Mac available.
Leave it powered on and connected to the internet. On a MacBook, keep power connected and the lid open; in System Settings → Battery → Options, enable the setting that prevents automatic sleep on power when the display is off. On a desktop Mac, look under Energy or Energy Saver, depending on macOS version. The display can turn off and the screen can lock. A reboot ends running tmux sessions. Apple sleep settings
-
Test access away from Wi-Fi.
On your phone, turn Wi-Fi off, leave cellular data and Tailscale connected, and connect through Prompt. Confirm your
worksession appears. Disconnect Prompt and reconnect: your session should still be there. You can also reattach from your Mac using the same command. tmux preserves the work even when the phone’s SSH connection closes. tmux getting started
Everyday controls
- Reopen or create
work:tmux new-session -A -s work - List sessions from a shell:
tmux ls - Detach without ending work: Control+B, then D
- Switch sessions: Control+B, then S
- Scroll through tmux history: Control+B, then [; use arrow/Page Up keys, then Q to leave.
- Create another named session from a shell outside tmux:
tmux new-session -A -s portfolio
Use Prompt’s Control key when entering tmux shortcuts. Avoid typing exit when you mean to detach: exiting the final shell ends that tmux session. Existing commands started outside tmux do not automatically move into it. tmux getting started
If something does not connect
- Timeout: Check that the Mac is awake, both Tailscale apps are connected, and Prompt uses the Mac’s Tailscale address.
- Connection refused: Check Remote Login and port 22.
- Authentication failed: Check the short username, Mac password, and Remote Login’s allowed users.
- tmux not found: Use its full path, obtained with
command -v tmuxon the Mac.
Prompt on the Mac is optional. To use it instead of Terminal, install Panic’s local terminal component, choose File → New Local Window, and run the same tmux command.