BumpyClock/agent-templates / skills/personal/ssh-doctor
ssh-doctor
UnverifiedDiagnose macOS SSH failures, Remote Login, pre-auth closes, and stale sessions.
SSH diagnosis
Keep diagnosis read-only unless the user requests repair. Do not change Remote Login, restart sshd, terminate sessions, or transfer credentials during diagnosis. Keep secrets, full environments, and unrelated configuration out of output.
Select evidence
Compare loopback and remote behavior to locate the failure. A loopback failure suggests sshd, launchd, or local configuration. A remote-only failure suggests the listener, network, or firewall. Treat these as hypotheses until evidence supports the cause.
Use only the checks needed for the current symptom:
- Remote Login status:
sudo systemsetup -getremotelogin. - Service status:
sudo launchctl print system/com.openssh.sshd. - Port listener:
sudo lsof -nP -iTCP:22 -sTCP:LISTEN. - Loopback reachability:
nc -vz 127.0.0.1 22. - Effective configuration:
sudo sshd -T, restricted to relevant access and listener fields. - Recent errors: targeted
log showqueries for sshd and launchd. - Session ownership:
psandlsoffor the suspected process IDs.
For a connection probe, use RequestTTY=no and RemoteCommand=none.
Use BatchMode=yes when an unattended password prompt could block.
Respect the user's authentication method for interactive diagnosis.
A pre-auth close with launchd error 67: Too many processes can indicate exhausted service instances.
Check service counts and session ownership before attributing the failure to stale sessions.
Do not assume that a process owned by PID 1 is inactive.
For remote-only failures, inspect the relevant interface and firewall state. Do not change firewall policy as a diagnostic probe.
Repair and completion
For authorized service repair, read repair safeguards. Report the supported cause, observed evidence, and remaining uncertainty. Reuse valid probes rather than repeat the baseline after unrelated steps. Stop when the cause is explained or the next check requires unavailable access or new authority.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |