TAILSCALE + SSH + TMUX FOR CLAUDE CODE & CODEX

Connect your phone to your Mac’s live sessions in 10 minutes.

ShakeJ Terminal lets your Android phone attach directly to tmux sessions running Claude Code and Codex on your Mac. Even if you rarely open Terminal, follow the numbered steps below one by one.

macOS 13+ Ventura or newer Android 10+ Phone or tablet Tailscale Free personal login ~10 min Total setup time
my-mac.tailnet.ts.net alex:22 · SSH
5h 42% 7d 68% · 2 sessions
ACTIVE TMUX SESSIONS
c1 claude · shakej-terminal
Needs choice

> Allow running test suite? (1/2)

c2 codex · api-server
Running

> Refactoring auth middleware...

Tap c1 to open live terminal
$ tmux attach -t c1
● Claude Code · ~/works/shakej-terminal
+ Edited 3 files · 8 unit tests pass
? Bash: ./gradlew testDebugUnitTest
Quick Choice
1. Allow once 2. Always allow
ESCTABCTRL^C↑↓↵
STEP 0 ~1 min

What You Need & How the Connection Works

Mac ComputermacOS 13 (Ventura) or newer
Android PhoneAndroid 10 or newer
Same Tailscale AccountSign in with the same account on both
About 10 MinutesOne-time setup on your Mac
Q. “Will my sessions show up as soon as I install Tailscale?”

No. Tailscale only builds a private, encrypted network road between your phone and your Mac. To actually see and control your sessions, ShakeJ Terminal signs into your Mac over SSH (Remote Login) and reads the sessions running inside tmux. That is why you need the 3 quick Mac steps below: (1) Remote Login ON, (2) the 1-line installer, and (3) running Claude Code / Codex inside tmux.

1. Android Phone
ShakeJ Terminal

Connects to my-mac.tailnet.ts.net:22 as user alex

2. Private Tunnel
Tailscale VPN

Links phone & Mac anywhere without port forwarding

3. Mac Doorway
Mac SSH (Port 22)

Enabled by turning on Remote Login in Sharing

4. Live Workspace
tmux Sessions (c1, c2)

Keeps Claude Code & Codex alive + sends status & alerts

✓ What success looks like

You have your Mac and Android phone in front of you, and you know which Google, Apple, or GitHub login you will use for Tailscale.

STEP 1 ~2 min

Install & Sign In to Tailscale on Your Mac

Tailscale gives your Mac a private address (such as 100.84.21.9 or my-mac.tailnet.ts.net) that only your own devices can reach—even when your phone is on cellular data outside your home.

Download Tailscale for macOS (tailscale.com/download/mac) ↗

macOS Menu Bar · Tailscale ● Connected
Tailscale: Connected
alex@example.com · This Mac: 100.84.21.9 (my-mac.tailnet.ts.net)
✓ What success looks like

Click the Tailscale icon in the top-right macOS menu bar: it says Connected and shows a 100.x.y.z IP address next to your Mac’s name.

Stuck? macOS asks to allow a VPN / Network Extension
When launching Tailscale for the first time, macOS shows a prompt asking to add a VPN configuration. Click Allow (and enter your Mac password or Touch ID if asked) so the tunnel can start.
STEP 2 ~1 min

Turn On Remote Login (SSH) on Your Mac

Open System Settings → General → Sharing, and switch Remote Login to ON. Click the ⓘ info button next to it and make sure “All users” (or your Mac account, e.g. alex) is allowed.

System Settings > General > Sharing macOS
Remote Login (SSH · Port 22)
Allow access for: All users (or user alex)
ON
✓ What success looks like

The Remote Login toggle is turned ON, and opening its ⓘ details shows your login account (or All users) permitted to connect.

Stuck? I can’t find “Remote Login” in System Settings
In the top-left search box of System Settings, type Remote Login or Sharing. You can also skip ahead to Step 3—if Remote Login is still off, the 1-line installer will automatically open the Sharing pane for you.
STEP 3 ~2 min

Run the 1-Line Setup Command in Mac Terminal

First, open the Terminal app on your Mac: press ⌘ Command + Space to open Spotlight search, type Terminal, and press Return.

⌕ Terminal ⌘ + Space

Copy the single line below, paste it into the Terminal window (⌘ + V), and press Return:

macOS Terminal — 1-Line Installer
curl -fsSL https://terminal.gamely.cc/install.sh | bash

This script checks SSH, installs or verifies tmux and jq, sets up ~/.shakej-terminal/ helper scripts and Claude notification hooks, and prints the exact address and username to enter on your phone:

==> [1/6] Checking Remote Login (SSH) ... OK (Port 22)
==> [2/6] Checking Homebrew & tools (tmux, jq) ... OK
==> [3/6] Checking Python 3 ... Python 3.12.4
==> [4/6] Installing ~/.shakej-terminal/{status.py,hook.sh,revive.sh} ... OK
==> [5/6] Registering Claude Code hooks (~/.claude/settings.json) ... OK
==> [6/6] Checking Tailscale address & status.py ... OK
============================================================
ShakeJ Terminal Server Setup Complete
============================================================
• Host for Phone App : 100.84.21.9 (or my-mac.tailnet.ts.net)
• Username : alex
• Port : 22
• Next Step : Run Claude / Codex inside tmux: tmux new -s c1
✓ What success looks like

The summary box at the bottom of Terminal prints your Host address (e.g. 100.84.21.9 or my-mac.tailnet.ts.net), your Username (e.g. alex), and Port 22.

Stuck? It says Homebrew or tmux is not installed

If your Mac does not have Homebrew yet, run these two commands in Terminal first, then run the 1-line installer again:

1. Install Homebrew (macOS Package Manager)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2. Install tmux and jq
brew install tmux jq
STEP 4 ~1 min

Start Claude Code or Codex Inside tmux

Why is tmux required? A normal Terminal window exists only on your Mac’s monitor—remote SSH connections cannot see or share it. Starting a tmux session keeps your workspace alive in the background even if you close the Terminal window, allowing both your Mac and your phone to view and type in the exact same live screen.

1. Create a new tmux session named c1 and start Claude Code (or Codex)
tmux new -s c1
2. Inside the tmux session, launch your coding tool
claude

Even if you close the Terminal window on your Mac, the c1 session keeps running. Whenever you want to reopen that same session on your Mac, run:

Re-attach to existing session c1 on your Mac
tmux attach -t c1
alex@my-mac ~/works/project $ claude
╭──────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code │
╰──────────────────────────────────────────────────╯
[c1] 0:claude* "my-mac" 19:30
✓ What success looks like

You see a green status bar at the very bottom of your Terminal window showing [c1] while Claude Code or Codex is running inside it.

Stuck? It says “duplicate session: c1” or I want a second session
If c1 already exists, run tmux attach -t c1 to re-enter it. To run a second project at the same time, create another name such as tmux new -s c2.
STEP 5 ~3 min

Connect from Your Android Phone

1. Install the Tailscale app on your Android phone, sign in with the same account you used on your Mac, and turn the VPN switch ON.
2. Open ShakeJ Terminal and tap Add Host (+). Fill in the address, username, and port 22 printed in Step 3.
3. Choose Password (your Mac login password) or tap Generate Key (recommended for passwordless login).

A. Add Host
Hostmy-mac.tailnet.ts.net
Usernamealex
Port22
AuthPassword / SSH Key
B. First Connect Fingerprint

New host key fingerprint:
SHA256:9xK4m...pQ2v

Trust & Connect
C. Tap Session c1
[c1] claudeTap →
[c2] codexRunning

Using “Generate Key” (Recommended): Tap Generate Key → Copy Public Key in the app, send that copied line to your Mac, replace PASTE_YOUR_PUBLIC_KEY_HERE below, and run it in Mac Terminal:

Register your phone’s SSH public key on your Mac
mkdir -p ~/.ssh && echo 'PASTE_YOUR_PUBLIC_KEY_HERE' >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys

4. On your first connection, the app shows your Mac’s SSH host fingerprint—tap Trust.
5. In the session list, tap c1 to jump right into your live terminal!

✓ What success looks like

Tapping c1 opens your live Claude Code or Codex terminal on your phone, and anything you type appears on your Mac screen at the same time.

Stuck? SSH Key login still asks for a password
Make sure the public key string starts with ssh-ed25519 on a single line and that directory permissions are strict: run chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys on your Mac.
STEP 6 ~1 min

Pro Tips for Daily Use

1. Special Key Row

Use the toolbar right above the keyboard for one-tap ESC, TAB, CTRL, arrow keys (↑↓←→), and ^C interrupt without hunting through mobile keyboard layers.

2. Two-Finger Pinch Zoom

Pinch in or out with two fingers directly on the terminal screen to adjust the monospace font size to fit dense code diffs or comfortable reading.

3. Seamless Auto-Reconnect

Switching between Wi-Fi and 5G or reopening the app automatically restores your active session tab and reconnects as soon as the network returns.

4. Top Usage Bar

Check your 5-hour and 7-day usage gauges and live connection status in the compact status strip at the top of the screen.

5. Actionable Alerts

When Claude Code asks for permission or finishes a task, your phone alerts you immediately—and you can approve choices straight from the quick-choice sheet.

✓ What success looks like

You can resize text with two fingers, send ESC / TAB from the special key bar, and receive notifications when a session waits for your input.

Stuck? I don’t see notifications on my phone
Check Android Settings → Apps → ShakeJ Terminal → Notifications and ensure notifications are allowed, and verify Step 3 was run so ~/.claude/settings.json has the hook registered.
STEP 7 FAQ

Troubleshooting FAQ

1. Connection timed out (Can’t reach my Mac)

This almost always means either Tailscale is turned off on one device, or your Mac went to sleep.

  • Verify the Tailscale VPN toggle is ON on both your Android phone and your Mac menu bar.
  • Prevent your Mac from sleeping while the display turns off: open System Settings → Energy (or Battery → Options on a MacBook plugged into power) and turn ON “Prevent automatic sleeping when the display is off”.
2. “Authentication failed” / My password doesn’t work

Enter the password you use to unlock your Mac login screen (not your Apple ID password). Also check Username: it must be your short account name—open Mac Terminal and run whoami (for example, enter alex instead of Alex Kim).

3. Connected, but no sessions appear in the list

ShakeJ Terminal lists sessions running inside tmux. If you launched claude or codex in a plain Terminal tab, it won’t appear. In Mac Terminal, run tmux new -s c1 first and then run claude inside it.

4. Korean / Japanese / CJK characters look broken or misaligned

Re-run the 1-line setup script on your Mac (curl -fsSL https://terminal.gamely.cc/install.sh | bash) to refresh UTF-8 session settings, then start a new tmux session or re-attach.

5. Can I connect to multiple Macs (e.g. Mac mini + MacBook)?

Yes! Run the 1-line installer on each Mac. Each Mac gets its own Tailscale address (e.g. my-mac-mini.tailnet.ts.net and my-macbook.tailnet.ts.net). Simply tap Add Host (+) in ShakeJ Terminal for each computer.