ssh-connection-test

Test SSH connectivity to hosts configured in ~/.ssh/config using sshm. Use when diagnosing connection issues, verifying hosts are reachable, or checking all hosts after a network change. Triggers include "test ssh", "ssh connectivity", "can I connect", "ssh reachable", "sshm test".

7 stars

Best use case

ssh-connection-test is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Test SSH connectivity to hosts configured in ~/.ssh/config using sshm. Use when diagnosing connection issues, verifying hosts are reachable, or checking all hosts after a network change. Triggers include "test ssh", "ssh connectivity", "can I connect", "ssh reachable", "sshm test".

Teams using ssh-connection-test should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ssh-connection-test/SKILL.md --create-dirs "https://raw.githubusercontent.com/heldernoid/agentic-build-templates/main/projects/cli-tools/ssh-config-manager/skills/ssh-connection-test/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ssh-connection-test/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ssh-connection-test Compares

Feature / Agentssh-connection-testStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Test SSH connectivity to hosts configured in ~/.ssh/config using sshm. Use when diagnosing connection issues, verifying hosts are reachable, or checking all hosts after a network change. Triggers include "test ssh", "ssh connectivity", "can I connect", "ssh reachable", "sshm test".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# ssh-connection-test

Guide to testing SSH connections with `sshm test`.

## Test a Single Host

```bash
sshm test web
```

Output:
```
  testing web (deploy@example.com:22)...

  ok  connected  (231ms)
```

## Test All Hosts

```bash
sshm test --all
```

Shows a table of all hosts with connection results and timing.

## Connection Result Types

| Result | Meaning |
|---|---|
| `connected` | SSH handshake succeeded |
| `timeout` | No response within 5 seconds |
| `refused` | Port is closed |
| `host not found` | DNS resolution failed |
| `auth failed` | Host reachable but key rejected |
| `unknown error` | Other SSH error |

## Diagnosing Failures

**timeout** - Host may be down, firewall blocking port, or wrong IP. Check: `ping hostname`, `telnet hostname 22`.

**refused** - SSH service not running on that port. Check if port in config matches actual SSH port.

**host not found** - DNS issue. Try using IP address directly: `sshm edit myhost --host 1.2.3.4`.

**auth failed** - Key not accepted. Check: key exists at IdentityFile path, key is in server's authorized_keys.

## How the Test Works

The test spawns `ssh` with:
- `ConnectTimeout=5` to avoid hanging
- `BatchMode=yes` to prevent interactive prompts
- The host's configured user, hostname, and port
- Runs `true` as the command (exits immediately on success)

The test does not create a persistent connection and does not execute any shell commands that could affect the server.

## Notes

- Connection test uses the host's current config (User, HostName, Port, IdentityFile)
- Test respects IdentityFile if set
- Auth failures are distinguished from unreachable hosts
- Timing shown in milliseconds

Related Skills

SKILL.md - cors-tester

7
from heldernoid/agentic-build-templates

## What this tool does

load-test-runner

7
from heldernoid/agentic-build-templates

No description provided.

ab-testing

7
from heldernoid/agentic-build-templates

Set up and evaluate A/B tests using feature-flag-server. Use when you need to run a multivariate experiment, assign users to variants, track which variant they received, or analyze variant distribution. Triggers include "A/B test", "split test", "experiment", "variant", "multivariate", "rollout percentage", or any task involving exposing different experiences to different users.

regex-tester

7
from heldernoid/agentic-build-templates

Live browser-based regex testing tool with match highlighting, capture group inspection, pattern explanation, and URL sharing

soil-test-tracker

7
from heldernoid/agentic-build-templates

Record soil test results, track nutrient levels over time, and log soil amendments. Use when asked to add a soil test, check which nutrients are deficient, view field nutrient history, record a lime or fertilizer application, or compare field health across tests. Triggers include "soil test", "soil pH", "nutrient deficiency", "add lime", "compost application", "phosphorus low", "organic matter", "amendment record", or any task involving soil chemistry tracking.

Skill: Uptime Monitoring

7
from heldernoid/agentic-build-templates

## Overview

Skill: Status Page

7
from heldernoid/agentic-build-templates

## Overview

Skill: unit-conversion

7
from heldernoid/agentic-build-templates

## Overview

Skill: recipe-scaler

7
from heldernoid/agentic-build-templates

## Overview

reading-list

7
from heldernoid/agentic-build-templates

Operate the reading-list API to save, manage, tag, search, and export articles.

email-digest

7
from heldernoid/agentic-build-templates

Configure, test, and troubleshoot the reading-list daily email digest delivered via nodemailer.

websocket-realtime

7
from heldernoid/agentic-build-templates

Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".