⏱️ Setup time: 15 min 💰 Cost: $0 👥 Users: Only you (SSH keys per person)
What you're building
In plain English: iPhone opens an SSH terminal to your Mac. You type claude ... commands as if you were sitting at the Mac. Output comes back on your iPhone screen.
When to use this
✅ Great fit: - You mostly use it when at home / office (Mac reachable) - You want the least amount of new infrastructure - You already have Claude Code + MCP working on Mac - You're comfortable with SSH concepts
❌ Bad fit: - Your Mac is often asleep / on a different network - You want batch/team access - Cellular-only usage (Mac must be reachable)
Setup Overview
1Enable Remote Login on your Mac
This turns on the SSH server (sshd) so incoming connections are accepted.
- System Settings → General → Sharing
- Toggle Remote Login → ON
- Click ⓘ next to Remote Login → note the SSH address shown (e.g.,
ssh [email protected]) - Under "Allow access for" → select "Only these users" → add your username (safer than "All users")
Verify from Terminal:
sudo systemsetup -getremotelogin
# Expected: Remote Login: On
2Find your Mac's IP address
Your Mac has multiple addresses. You need the local network IP (works on same Wi-Fi).
# Wi-Fi IP
ipconfig getifaddr en0
# Ethernet IP (if using cable)
ipconfig getifaddr en1
# All interfaces
ifconfig | grep "inet " | grep -v 127.0.0.1
Note this IP - you'll use it as <MAC_IP> throughout.
Alternative - use Bonjour hostname (auto-updates if IP changes):
hostname
# e.g., Your-MacBook.local
You can SSH to Your-MacBook.local instead of the IP - works on same network automatically.
💡 For remote access outside your Wi-Fi network, you'd need port forwarding on your router OR a service like Tailscale (recommended - free tier, zero-config VPN). We'll cover Tailscale as a bonus at the end.
3Set a strong Mac password (critical for security)
If Remote Login is on, your Mac accepts SSH connections. If your password is weak, anyone on your network can brute-force in.
Change password: System Settings → Users & Groups → your user → Change Password
Minimum standards: - 16+ characters - Mix of upper/lower/digits/symbols - Not used anywhere else - Store in password manager (1Password, Bitwarden, iCloud Keychain)
Even better - disable password SSH entirely, use only keys (Step 5 handles this).
4Generate SSH key pair on iPhone (Termius)
SSH keys are more secure than passwords AND enable Siri shortcuts (which can't type passwords).
4.1 - Install Termius from App Store (free version is fine)
4.2 - Generate key pair inside Termius
- Open Termius
- Tap Keychain tab (bottom navigation)
- Tap + (top right) → Keys → Generate Key
- Fill in:
- Type:
Ed25519(modern, small, fast) - Name:iphone-to-mac- Password: leave empty for Siri automation compatibility (or set one for extra security) - Tap Save
4.3 - Copy the public key
- Tap the key you just created
- Tap Export → Public Key → Copy
The public key looks like:
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... iphone-to-mac
Now you need to get this string onto your Mac. Options: - AirDrop from iPhone Notes to Mac - Email it to yourself - Type it into a temporary shared note
5Install public key on Mac (enable key-based login)
On your Mac, in Terminal:
# Create SSH directory if it doesn't exist
mkdir -p ~/.ssh
chmod 700 ~/.ssh
# Append the iPhone's public key to authorized_keys
# Paste the key you copied from Termius after 'EOF'
cat >> ~/.ssh/authorized_keys << 'EOF'
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... iphone-to-mac
EOF
# Set correct permissions (SSH refuses to work otherwise)
chmod 600 ~/.ssh/authorized_keys
Verify:
cat ~/.ssh/authorized_keys
# Should show your iPhone's public key
5.1 - (Optional but recommended) Disable password SSH
Once key-based auth works, disable password auth to close the brute-force attack surface.
sudo nano /etc/ssh/sshd_config
Find and change these lines:
PasswordAuthentication no
ChallengeResponseAuthentication no
PubkeyAuthentication yes
Save (Ctrl+O, Enter, Ctrl+X), then restart SSH:
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd
Don't do this step until you've verified key-based login works in Step 8 - otherwise you'll lock yourself out.
6Complete Termius setup on iPhone
6.1 - Add your Mac as a host
- In Termius, tap Hosts tab → + → New Host
- Fill in:
- Alias:
My Mac(or whatever you like) - Address: your Mac's IP or.localhostname - Port:22- Username: your Mac username (e.g.,YOUR_USERNAME) - Key: tap → selectiphone-to-mac(the one you generated) - Tap Save
7First SSH connection
- Termius Hosts → tap My Mac
- First time only: it'll ask to trust the fingerprint → tap Yes
- You should see your Mac's shell prompt
Verify you're actually on Mac:
hostname
# Should show your Mac's hostname
whoami
# Should show your Mac username
If you get "Permission denied" errors, see Troubleshooting below.
8Run Claude commands from iPhone
Now the payoff. Type these directly in the Termius terminal:
# Simple read
claude -p "What's due this week on sheet $TS03_SHEET, TS-03 Quiz & Assignment tab?"
# List tabs
claude -p "List all tabs in sheet $TS03_SHEET"
# Use your existing aliases (if env vars set in your Mac's ~/.zshrc)
ts03-week
ts03-upcoming
Expected: Same output you'd see on your Mac - full tables, formatted responses.
Step 9 (Optional): Siri Shortcut wrapper
Turn "Hey Siri, tracker check" into a full query.
9.1 - Create the shortcut
- Open Shortcuts app on iPhone → + (top right)
- Add these actions in order:
Action 1: Run Script over SSH
- Server: <MAC_IP> or Your-MacBook.local
- Port: 22
- User: your Mac username
- Authentication: SSH Key
- Key: select the one from Termius (or generate a new one in Shortcuts if needed)
- Script:
bash
source ~/.zshrc && claude -p "What's due this week on sheet $TS03_SHEET, TS-03 Quiz & Assignment tab?"
Action 2: Speak Text - Text: the output from Action 1
Action 3: Show Notification (optional) - Title: "Tracker Check" - Body: output
9.2 - Name it + add to Siri
- Tap shortcut name → rename to
Tracker Check - Tap Settings icon → Add to Siri → record "tracker check" (or your preferred phrase)
- Optional: Add to Home Screen for one-tap access
9.3 - Usage
- Say "Hey Siri, tracker check" from anywhere (iPhone, Watch, HomePod, CarPlay)
- Or tap the home screen icon
- Siri will connect to Mac, run Claude, speak the response
Note: The SSH shortcut in iOS Shortcuts app requires the shortcut's own SSH key - you may need to generate one specifically in the Shortcuts action (it's separate from Termius).
Bonus: Access outside your Wi-Fi network (Tailscale)
If you want to SSH from cellular/coffee shop Wi-Fi to your home Mac, use Tailscale - it creates a private VPN mesh across your devices.
Setup (10 min)
- Sign up at tailscale.com (free personal plan)
- Install on Mac:
brew install tailscale && sudo tailscale up - Install Tailscale iOS app → sign in with same account
- In Termius, change host address from
192.168.x.xto your Mac's Tailscale IP (100.x.x.x - shown in Tailscale app) - Now SSH works from anywhere in the world, encrypted end-to-end
Sharing this with others
Short answer: you can't easily. SSH gives access to your Mac's shell - sharing that means sharing your entire computer. Not safe.
For batch/team access, use Option 4 (WhatsApp Bot) instead.
If you must share with one trusted person:
1. They send you their SSH public key
2. You append it to your Mac's ~/.ssh/authorized_keys
3. Create a separate limited user account for them (so they only access one folder, not your whole Mac)
4. Restrict what commands they can run via ~/.ssh/authorized_keys command= restriction
Troubleshooting
Error: "Permission denied (publickey)"
Cause: SSH key not correctly installed on Mac.
Fix:
# On Mac, verify authorized_keys exists and has correct permissions
ls -la ~/.ssh/authorized_keys
# Should show: -rw------- (600) YOUR_USERNAME staff
# If permissions are wrong:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
Also verify the public key was pasted correctly (no line breaks in the middle).
Error: "Connection refused"
Cause: Remote Login not enabled, or Mac firewall blocking.
Fix: - System Settings → General → Sharing → Remote Login → ON - System Settings → Network → Firewall → allow incoming SSH
Error: "Host key verification failed"
Cause: Mac's SSH host key changed (reinstall, wipe, etc.) since Termius cached the old one.
Fix in Termius: - Long-press the host → Edit → Advanced → Clear Host Key → Save
Can't SSH when on cellular / different Wi-Fi
Cause: Mac's local IP isn't reachable from outside your Wi-Fi network.
Fix: Use Tailscale (see Bonus section above).
Siri Shortcut says "Cannot connect"
Cause: Usually the Shortcut's SSH key isn't installed on Mac, OR your Mac went to sleep.
Fix:
- Ensure Mac doesn't sleep the network: System Settings → Battery → Wake for network access → ON
- Verify Shortcut's SSH key was added to Mac's ~/.ssh/authorized_keys
Security Checklist
- [ ] Mac password is 16+ chars, unique, in password manager
- [ ] Public key-based auth working
- [ ] Password auth disabled in
sshd_config(once keys verified) - [ ] Mac firewall enabled with SSH exception
- [ ] Only your user account allowed to SSH (not "All users")
- [ ] Termius key uses Ed25519 (not RSA/DSA)
- [ ] If sharing key across devices, each device has its own key (revoke individually if lost)
Alternative SSH apps for iPhone
| App | Pros | Cons |
|---|---|---|
| Termius (recommended) | Free tier great, sync across devices, snippets | Some features paywalled |
| Prompt 3 | Best UI, powerful, offline snippets | $15 one-time |
| Blink Shell | Terminal + Mosh + WebSSH combo, developer favorite | Paid, learning curve |
| iOS Shortcuts (native) | No app needed, works with Siri | Limited to basic commands |
For most people: Termius - free tier handles this use case perfectly.
Summary
You now have iPhone → Mac SSH → Claude Code → Google Sheets. It's the quickest personal option, but limited to your Mac being on + reachable.
Next steps: - If Mac isn't always reachable → try Option 3 (Apps Script + Shortcut) for offline-capable iPhone flow - If you want batch access → try Option 4 (WhatsApp Bot) - If you want voice-first → try Option 5 (Siri Voice)
Questions or corrections: [email protected]