Skip to content
Back to skills

Ssh Doctor

ASecurity

Diagnose macOS SSH failures, Remote Login, pre-auth closes, and stale sessions.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
security

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add BumpyClock/agent-templates --skill ssh-doctor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ssh Doctor?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ssh Doctor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bumpyclock-ssh-doctor/badge)](https://www.skillsdirectory.com/skills/bumpyclock-ssh-doctor)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ssh-doctor
description: Diagnose macOS SSH failures, Remote Login, pre-auth closes, and stale sessions.
disable-model-invocation: true
---

# 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 show` queries for sshd and launchd.
- Session ownership: `ps` and `lsof` for 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](references/repair.md).
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.

Files in this skill

  • SKILL.md2.1 KB
  • agents/openai.yaml286 B
  • attribution.txt167 B
  • references/repair.md1.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.