samayly.com is live. Hosted plans open soon. Join the waitlist →
Guide 0515 min7 min read

5. iPhone via SSH (Termius)

Run the same ts03 commands from your iPhone by SSHing into your Mac.

⏱️ 15 minutes · Works on the same Wi-Fi. For anywhere access, add Guide 6.

SSH, key auth
port 22

ts03-brief → MCP

answer

text output

📱 iPhone
Termius

💻 Mac
sshd → zsh → claude

📊 Google Sheet


1Turn on Remote Login (Mac)

  1. System Settings → General → Sharing → Remote Login → ON
  2. Click ⓘ → Allow access for: Only these users → add your account
  3. Note the address shown, e.g. ssh [email protected]

Check:

bash
sudo systemsetup -getremotelogin     # Remote Login: On
hostname                              # e.g. Your-MacBook.local
ipconfig getifaddr en0                # e.g. 192.168.1.20

Use the .local hostname where possible. It keeps working when the IP changes.


2Create an SSH key on iPhone (Termius)

Keys are safer than passwords and are needed later for Shortcuts automation.

  1. Install Termius from the App Store
  2. Keychain tab → + → Generate Key
  3. Type Ed25519, name iphone-to-mac, leave passphrase empty (or set one for extra safety)
  4. Save, open the key → Export → Copy public key

It looks like:

code
ssh-ed25519 AAAAC3Nza... iphone-to-mac

Get it to the Mac: AirDrop a note, or email it to yourself.


3Authorize the key (Mac)

bash
mkdir -p ~/.ssh && chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys          # paste the ONE line, save
chmod 600 ~/.ssh/authorized_keys
cat ~/.ssh/authorized_keys

Paste the key into authorized_keys, not into the terminal. Typed at the prompt, it's just run as a (failing) command.


4Add the Mac as a host in Termius

Hosts → + → New Host

Field Value
Alias My Mac
Hostname Your-MacBook.local (or the IP)
Port 22
Username your Mac short username (whoami)
Key iphone-to-mac

Tap the host → accept the fingerprint the first time.

Check you're on the Mac:

bash
whoami && hostname

5Log in to Claude Code from the SSH session

The SSH session needs Claude Code logged in. If claude -p "say hi" says Not logged in:

bash
claude        # interactive session
/login        # at the Claude prompt
  • Long-press the printed URL → open in Safari → sign in → approve.
  • Or do the /login once on the Mac itself. It carries over to SSH sessions.

Then /exit (or ctrl + d) to return to the shell.

Menus inside Claude: use ↑ ↓ to move and Enter to confirm. If your Termius toolbar has no arrows, add them (Step 8). Esc cancels.

Folder trust prompt: starting claude in a new folder asks "Do you trust this folder?". Choose Yes for your own folders. Running from ~ avoids surprises.


6Load your shell setup on connect

Termius → edit host → Startup Snippet:

bash
source ~/.zshrc && clear && ts03-health

Every session starts with your ts03 commands loaded and a connection check.


7Test from iPhone

bash
ts03-health
ts03-brief
ts03 how many rows are in my tracker

If ts03-health shows Connection closed but the Mac says ✔ Connected, your credentials are in a privacy-protected folder. Move them to ~/.config/mcp-credentials/ (Guide 2, Troubleshooting).


8Make the phone keyboard pleasant

Add arrow keys: Termius Settings → Keyboard (extra keys row) → add ↑ ↓ ← →.

Keys that work with ctrl (tap ctrl in the toolbar, then the letter):

Keys Does
ctrl r Search command history
ctrl p / ctrl n Previous / next command
ctrl a / ctrl e Start / end of line
ctrl u Clear line
ctrl c Cancel
ctrl d Exit Claude / close shell

Snippets (one tap, no typing): Termius → Snippets → +

Name Command
Brief ts03-brief
Week ts03-week
Urgent ts03-urgent
Reminder ts03-wa
Health ts03-health

In a session, tap the grid icon next to the host tab to run one.


Optional: Siri shortcut

Shortcuts app → new shortcut: 1. Run Script over SSH: host, user, SSH Key auth, script: bash source ~/.zshrc && ts03-brief 2. Speak Text (or Show Result)

Add to Siri as "tracker brief". The Shortcuts app generates its own SSH key: add that public key to ~/.ssh/authorized_keys too.


Optional: harden SSH (after key login works)

bash
sudo nano /etc/ssh/sshd_config

Set:

code
PasswordAuthentication no
KbdInteractiveAuthentication no
PubkeyAuthentication yes

Restart Remote Login (toggle it off/on in Sharing). Test a new Termius session before closing the old one, so you don't lock yourself out.


Checklist

  • [ ] Remote Login on, limited to your user
  • [ ] Ed25519 key in ~/.ssh/authorized_keys (permissions 600)
  • [ ] Termius host uses the key
  • [ ] claude -p "say hi" works over SSH
  • [ ] ts03-health shows ✔ Connected over SSH
  • [ ] Credentials in ~/.config/mcp-credentials/
  • [ ] Snippets added

➡️ Next: 6. Access from anywhere

Questions or corrections: [email protected]