ssh-doctor

Diagnose macOS SSH connection issues by analyzing server configuration, logs, and network settings.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/Khang5687/agent-scripts --skill ssh-doctor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ssh-doctor
Source: https://github.com/Khang5687/agent-scripts/tree/main/skills/ssh-doctor
Command: npx skills add https://github.com/Khang5687/agent-scripts --skill ssh-doctor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

The SSH Doctor Skill provides a set of commands to diagnose and resolve common SSH connection issues on Macs, helping users identify and fix problems that prevent successful SSH login or other related issues.

Core Features & Use Cases

  • SSH Connection Diagnostics: Identifies common SSH issues such as pre-auth closes, remote login problems, and diagnosis of local/remote Mac SSH setup.
  • System Information Gathering: Collects critical system information for debugging SSH-related problems, including SSH server and configuration details.
  • Config and Log Analysis: Inspects SSH server configurations and logs to identify problematic settings or events that might affect SSH connections.
  • Stale Session Removal: Provides instructions to safely terminate and remove stale SSH sessions that could be blocking new connections.
  • Firewall and Interface Checks: Ensures the SSH service is listening on the correct interface and port and checks for any firewall rules that may block SSH traffic.
  • Token Management: Offers guidelines on managing OP_SERVICE_ACCOUNT_TOKEN for remote environments.

Quick Start

Run the ssh-doctor skill to begin troubleshooting SSH issues on your system.

Frequently Asked Questions about ssh-doctor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose SSH connection issues on macOS?

To diagnose SSH connection issues on macOS, you can analyze server configurations, system logs, and network settings to identify why remote logins are failing or experiencing pre-auth closures.

What's the best way to troubleshoot SSH pre-auth closures on Mac?

Troubleshoot SSH pre-auth closures on Mac by inspecting system and service logs, verifying SSH server configuration settings, and checking for problematic rules that interrupt authentication.

Why does my macOS SSH server refuse remote login connections?

Your macOS SSH server may refuse remote login connections due to incorrect firewall settings, the service not listening on the correct interface and port, or stale SSH sessions blocking new connections.

Can I fix SSH remote login problems on macOS without restarting the system?

Yes, you can fix SSH remote login problems by safely removing stale SSH sessions, checking the firewall settings, verifying the SSH service listens on the correct port, and adjusting server configurations.

How do I check if my Mac firewall is blocking SSH traffic?

Check if your Mac firewall is blocking SSH traffic by inspecting firewall rules, ensuring the SSH service is listening on the correct interface and port, and analyzing system logs for blocked connection events.

Does SSH diagnosis on macOS require special system logs?

Yes, SSH diagnosis on macOS requires specific system and service logs to identify remote login failures, pre-auth closures, and configuration errors affecting the SSH server.