remote-mac

Runs and checks things on a remote Mac over Tailscale or SSH: non-interactive commands, tmux sessions, and service checks. Use when work must happen on another Mac you are not sitting at.

SKILL.md

GitHub

Remote Mac

Attribution: Sourced from steipete/agent-scripts by Peter Steinberger.

Use when you need to run or check something on a remote Mac over Tailscale or SSH.

Discovery

  1. Start with tailscale status and pick the matching host.
  2. If Tailscale is down or SSH times out, try LAN discovery:
dns-sd -B _ssh._tcp local
arp -a
  1. Try mDNS names such as HOST.local when visible.

SSH Rules

Use non-interactive SSH by default:

ssh -o RequestTTY=no -o RemoteCommand=none HOST 'COMMAND'

For long-running or interactive remote work, use tmux on the remote host:

ssh HOST 'tmux new-session -d -s work "long-command"'
ssh HOST 'tmux attach -t work'

Login Shell for PATH

Use login shells on remote Macs so Homebrew and other tools are on PATH:

ssh -o RequestTTY=no -o RemoteCommand=none HOST 'zsh -lc "command"'

Service Health Check Pattern

# Check launchd service
ssh HOST 'launchctl list | grep service-name'

# Check process
ssh HOST 'pgrep -af "process-name"'

# Check port listener
ssh HOST 'lsof -nP -iTCP:8080 -sTCP:LISTEN'

# Check tmux sessions
ssh HOST 'tmux list-sessions'

Safety

  • Do not assume host identity from a stale IP; verify hostname/user when possible.
  • Do not print secrets from remote files or shells.
  • If a host is unavailable after Tailscale + LAN fallback, say what was tried.
  • Do not install/start/stop services unless explicitly asked.