agentleFS
mdmiller5933mdmiller5933/agentic-it-ops/skills/ssh-access/SKILL.md

ssh-access

Skill0 starsChanged 3 months agoMITView on GitHub

Fast SSH access workflow for Contoso-managed Windows endpoints. Use when the user asks to SSH into, open a shell on, or run a command over SSH on a Contoso laptop or workstation identified by hostname, serial, or user - including checking Cato VPN reachability, ScreenConnect live session metadata, local Contoso SSH keys, or port 22/sshd readiness before opening an interactive session. Prefer this over ScreenConnect command execution when an interactive shell or quick remote command is the goal and the endpoint is reachable over Cato.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the bundled fast-path script first.

    line 8
  2. Very specific:

    When the endpoint uses the Contoso local admin key pattern, connect as ContosoAdmin:

    line 26
  3. Distinctive:

    If live metadata is stale or the user just connected to Cato, include a read-only endpoint network check:

    line 32
  4. Distinctive:

    If SSH reaches the endpoint but key authentication fails, include a read-only auth check:

    line 38
  5. Very specific:

    Use live ScreenConnect GetSessionsByFilter when available.

    line 52
  6. Very specific:

    Use C:\Users\AveryOperatorContrac\.ssh\id_ed25519_contoso_ssh automatically when it exists.

    line 54
  7. Very specific:

    Use --screenconnect-check when the ScreenConnect session is online but the advertised private IP is not reachable.

    line 55
  8. Very specific:

    Use --auth-check when SSH reaches the endpoint but returns Permission denied.

    line 56
  9. Very specific:

    If sshd_config routes the administrators group to C:\ProgramData\ssh\administrators_authorized_keys and that file contains the local …

    line 57
  10. Distinctive:

    Keep ScreenConnect auth material and SSH private key contents out of chat, logs, and generated files.

    line 58
  11. Distinctive:

    Treat ScreenConnect endpoint commands, firewall changes, service restarts, installs, reboots, and policy changes as production-impacting.

    line 59
  12. Distinctive:

    Use the script output to distinguish cases:

    line 63
  13. Distinctive:

    No live ScreenConnect match: use the it-operations skill and endpoint cache to confirm hostname, serial, user, and current ownership.

    line 67

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Contoso SSH Access

Use the bundled fast-path script first. It queries ScreenConnect live for the target endpoint, extracts current private/public candidate addresses, tests TCP 22 and SSH banner readiness, then optionally launches ssh.

Fast Path

The fast-path script is scripts/contoso-ssh-fast-path.mjs inside this skill's folder (same content under ~/.claude/skills and ~/.codex/skills); substitute that full path in the commands below. It works from any working directory:

node "<this skill's folder>\scripts\contoso-ssh-fast-path.mjs" LAPTOP-UNNAMED08

To connect after the checks:

node "<this skill's folder>\scripts\contoso-ssh-fast-path.mjs" LAPTOP-UNNAMED08 --connect

When the endpoint uses the Contoso local admin key pattern, connect as ContosoAdmin:

node "<this skill's folder>\scripts\contoso-ssh-fast-path.mjs" LAPTOP-UNNAMED08 --screenconnect-check --connect --user ContosoAdmin

If live metadata is stale or the user just connected to Cato, include a read-only endpoint network check:

node "<this skill's folder>\scripts\contoso-ssh-fast-path.mjs" LAPTOP-UNNAMED08 --screenconnect-check

If SSH reaches the endpoint but key authentication fails, include a read-only auth check:

node "<this skill's folder>\scripts\contoso-ssh-fast-path.mjs" LAPTOP-UNNAMED08 --auth-check

To run a remote command instead of an interactive shell:

node "<this skill's folder>\scripts\contoso-ssh-fast-path.mjs" LAPTOP-UNNAMED08 --connect -- hostname

Defaults

  • Use live ScreenConnect GetSessionsByFilter when available. It is the quickest source for current Cato/private IP and online state.
  • Fall back to %TEMP%\codex-endpoint-cache\endpoint-inventory-join.json only when live ScreenConnect env is missing or unavailable.
  • Use C:\Users\AveryOperatorContrac\.ssh\id_ed25519_contoso_ssh automatically when it exists.
  • Use --screenconnect-check when the ScreenConnect session is online but the advertised private IP is not reachable; it runs only read-only checks for IP configuration, sshd, listeners, and OpenSSH firewall rules.
  • Use --auth-check when SSH reaches the endpoint but returns Permission denied; it checks sshd_config, administrator/user authorized_keys file presence, and whether the local .pub key is already present.
  • If sshd_config routes the administrators group to C:\ProgramData\ssh\administrators_authorized_keys and that file contains the local Contoso public key, try --user ContosoAdmin before trying AzureAD user formats.
  • Keep ScreenConnect auth material and SSH private key contents out of chat, logs, and generated files.
  • Treat ScreenConnect endpoint commands, firewall changes, service restarts, installs, reboots, and policy changes as production-impacting. Ask for explicit approval before changing state.

If SSH Fails

Use the script output to distinguish cases:

  • tcpOpen=false: network path is blocked or the address is stale. Confirm the user is on Cato, then rerun the script.
  • tcpOpen=true but sshBanner=false: something is accepting TCP but not completing SSH. Try the next candidate address or inspect the endpoint with ScreenConnect.
  • No live ScreenConnect match: use the it-operations skill and endpoint cache to confirm hostname, serial, user, and current ownership.

For endpoint-local SSH health checks, use the screenconnect-remote-diagnostics skill and run read-only checks only: sshd service status, port 22 listeners, OpenSSH firewall rules, and Get-NetIPConfiguration.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.