Research and configuration guides for accessing Odin (home Mac) remotely while traveling.
Prerequisites
- ✅ TailScale VPN configured on both Odin and laptop
- ✅ Syncthing running for file synchronization
- ✅ Same iCloud account syncing Documents folder
Remote Desktop Access
Option 1: macOS Screen Sharing (Recommended)
Advantages:
- Native macOS integration
- Works over TailScale VPN
- Low bandwidth usage
- Secure encryption
Setup on Odin:
-
Enable Screen Sharing:
# Via System Settings UI System Settings → General → Sharing → Screen Sharing (enable)Or via command line:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist -
Configure Access:
- Allow access for: "Only these users" → Add your user account
- Or allow "All users" if multiple accounts need access
-
Get TailScale IP:
tailscale ip -4 # Example output: 100.x.x.x
Connect from Laptop:
-
Via Finder:
- Press
⌘K(Connect to Server) - Enter:
vnc://100.x.x.x(Odin's TailScale IP) - Click Connect
- Enter macOS credentials
- Press
-
Via Screen Sharing App:
open vnc://100.x.x.x -
Create Bookmark:
- After connecting, add server to sidebar for quick access
- Or create alias:
ssh odin 'open vnc://localhost'(if SSH configured)
Option 2: Apple Remote Desktop (ARD)
More features but requires app purchase. Screen Sharing is sufficient for most needs.
Option 3: Third-Party Solutions
NoMachine, AnyDesk, TeamViewer:
- Generally unnecessary when TailScale + Screen Sharing works
- May have additional latency or costs
- Consider only if Screen Sharing performance is inadequate
Performance Optimization
Network Settings:
- TailScale direct connection is ideal (peer-to-peer when possible)
- Check connection quality:
tailscale status - If relayed connection, consider:
tailscale up --accept-routes
Screen Sharing Quality:
- Adaptive quality based on bandwidth
- Lower resolution/color depth for slow connections
- Full quality when on same network or good connection
Security Notes
- TailScale provides WireGuard encryption
- Screen Sharing adds VNC encryption layer
- Ensure Odin firewall allows TailScale connections
- Consider requiring password after sleep/screensaver
SSH Access + tmux
SSH Configuration
Setup on Odin:
-
Enable Remote Login:
# Via System Settings UI System Settings → General → Sharing → Remote Login (enable)Or via command line:
sudo systemsetup -setremotelogin on -
Verify SSH is running:
sudo launchctl list | grep ssh # Should see: com.openssh.sshd -
Get TailScale IP (if not already noted):
tailscale ip -4 # Example: 100.x.x.x
Configure on Laptop:
-
Create SSH config for easy access:
# Edit ~/.ssh/config cat >> ~/.ssh/config <<EOF Host odin HostName 100.x.x.x User $(whoami) ForwardAgent yes ServerAliveInterval 60 ServerAliveCountMax 3 EOF -
Set up SSH key authentication (if not already done):
# Generate key if needed ssh-keygen -t ed25519 -C "laptop-to-odin" # Copy to Odin ssh-copy-id odin -
Test connection:
ssh odin
tmux Session Management
Philosophy:
- Use named tmux windows to identify processes
- Never kill the 'agent' window (where Claude Code runs)
- Always verify window names before operations
Common Workflows:
-
Connect to existing tmux session:
ssh odin tmux attach -
List tmux windows remotely:
ssh odin "tmux list-windows" -
View specific window output:
ssh odin "tmux capture-pane -t <window-name> -p | tail -20" -
Create new background window:
ssh odin "tmux new-window -n <name> -d '<command>'" -
Kill specific window (NEVER 'agent'):
# First verify windows ssh odin "tmux list-windows" # Then kill by name ssh odin "tmux kill-window -t <window-name>"
Helper Functions (add to laptop's ~/.zshrc or ~/.bashrc):
# Quick tmux window listing on Odin
alias odin-tmux='ssh odin "tmux list-windows"'
# View window output
odin-tmux-view() {
ssh odin "tmux capture-pane -t $1 -p | tail -20"
}
# Safe window kill (with confirmation)
odin-tmux-kill() {
local window=$1
if [[ "$window" == "agent" ]]; then
echo "ERROR: Cannot kill 'agent' window (Claude Code)"
return 1
fi
echo "Killing window: $window"
ssh odin "tmux kill-window -t $window"
}Safety Checks:
# Always rename Claude Code window first (on Odin)
tmux rename-window agent
# Before any operations, list windows
tmux list-windows
# Verify agent window exists
tmux list-windows | grep agentSSH + tmux Best Practices
-
Persistent Sessions:
- tmux sessions survive SSH disconnections
- Reattach anytime with
ssh odinthentmux attach
-
Network Resilience:
-
Use
moshinstead of SSH for unstable connections:brew install mosh ssh odin "brew install mosh" mosh odin
-
-
Session Naming:
-
Use descriptive tmux session names:
tmux new-session -s work tmux new-session -s automation
-
-
Monitoring:
- Check TailScale status:
ssh odin "tailscale status" - Monitor tmux sessions:
ssh odin "tmux ls"
- Check TailScale status:
Troubleshooting
Cannot Connect to Screen Sharing
-
Check TailScale:
tailscale status # On both laptop and Odin -
Verify Screen Sharing is enabled:
ssh odin "sudo launchctl list | grep screensharing" -
Check firewall:
ssh odin "sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate" -
Test VNC port:
nc -zv 100.x.x.x 5900
SSH Connection Issues
-
Verify Remote Login:
ssh odin "sudo systemsetup -getremotelogin" # Should return: Remote Login: On -
Check SSH daemon:
ssh odin "sudo launchctl list | grep ssh" -
Test basic connectivity:
ping 100.x.x.x tailscale ping odin
tmux Session Not Found
-
List all sessions:
ssh odin "tmux ls" -
Create new session if needed:
ssh odin "tmux new-session -d -s main" -
Attach to specific session:
ssh odin "tmux attach -t main"
Quick Reference
Connect to Odin:
# Screen Sharing
open vnc://100.x.x.x
# SSH
ssh odin
# SSH + tmux attach
ssh odin -t "tmux attach"Monitor Running Processes:
# View tmux windows
ssh odin "tmux list-windows"
# View specific window
ssh odin "tmux capture-pane -t <window-name> -p | tail -20"
# View all tmux sessions
ssh odin "tmux ls"TailScale Management:
# Check status
tailscale status
# Get IP
tailscale ip -4
# Ping peer
tailscale ping odinNext Steps
- Enable Screen Sharing on Odin
- Enable Remote Login (SSH) on Odin
- Configure SSH config on laptop with 'odin' alias
- Test Screen Sharing connection
- Test SSH + tmux access
- Add helper functions to laptop shell config
- Bookmark Odin's VNC address in Finder
- Verify TailScale connection quality
Related Documents
- RESOURCES/research--workflow-cron-automation.md - Scheduling workflows while away
- .agents/scripts/README.md - Workflow dispatcher documentation