본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)48k · #6302

sshepherd

하는 일

AI 에이전트가 비밀번호나 연결 정보를 보지 않고도 SSH로 원격 서버를 제어하도록 합니다. 서버 상태를 확인하고, Docker 같은 서비스를 관리하며, 파일을 편집하고, 데이터베이스를 조회할 수 있습니다.

사용하는 경우

  • ✓서버가 잘 작동하는지 확인할 때(디스크, 메모리, CPU).
  • ✓Docker 서비스를 다시 시작하거나 로그를 볼 때.
  • ✓서버의 설정 파일을 읽거나 편집하는 경우.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/sshepherd/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/sshepherd/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“‘my-prod-server’의 상태를 확인하고 ‘web-app’ 서비스를 다시 시작해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

서버 연결 정보는 채팅 밖에서 한 번 별칭(alias)으로 설정합니다. 그다음 AI에게 그 별칭을 사용해 상태 확인이나 서비스 관리 같은 특정 명령을 실행하도록 요청합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

sshepherd

Overview

sshepherd is a compiled Bun/TypeScript CLI that lets an agent operate a real remote server over SSH — health checks, docker/systemd service control, log tailing, config file edits, read-only Postgres introspection, and declarative deploys — without ever seeing a password, private key, hostname, username, or port. Every operation shells out to the system ssh binary through a single transport path and returns the same typed Envelope<T> (ok, alias, data, error), never a raw terminal dump. The agent passes only a name — an ssh alias, a Postgres target, or a deploy recipe — that resolves entirely outside the process.

When to Use This Skill

  • Use when you need to check a remote server's health (disk, memory, CPU, ports, OOM history) without handing the agent SSH credentials.
  • Use when working with remote docker or systemd services — listing, inspecting, or restarting them — or tailing their logs.
  • Use when the user asks to read or edit a remote config file, run a declarative deploy from a named recipe, introspect a remote Postgres database read-only, or audit SSH/security posture on a box.

How It Works

Step 1: Declare targets once, outside any prompt

Every connection detail is declared ahead of time and never appears on the command line: ssh aliases in ~/.ssh/config, Postgres targets in ~/.config/sshepherd/targets.toml, deploy recipes in recipe TOML files. OpenSSH resolves the real HostName/User/Port/IdentityFile internally.

Step 2: Invoke a group + action by name

This repository does not ship the sshepherd executable. The user must install or build a reviewed upstream release outside the current workspace and provide its explicit absolute path. Verify it is an executable regular file, not a symlink, before use. Never auto-discover or execute ./dist/sshepherd from the repository being operated on.

sshepherd <group> <action> [positionals...] [--flag value]

Nine command groups — hosts, check, logs, services, deploy, config, db, files, security — 52 ops total. Output is JSON to stdout by default; add --pretty for a human-readable table/key-value view. The response only ever echoes back the alias it was given — there is no host/user/port/ip field anywhere in the response type, structurally.

Step 3: Discover the command surface

"/absolute/path/to/sshepherd" --help                 # list groups
"/absolute/path/to/sshepherd" check --help           # list actions + flags for one group

Examples

Example 1: Server health overview

"/absolute/path/to/sshepherd" check overview lms-server

Returns a JSON envelope with disk, memory, CPU, listening ports, and OOM history for the host behind the lms-server alias — the agent never learns the host's address.

Example 2: Restart a docker service and tail its logs

"/absolute/path/to/sshepherd" services restart lms-server --name api
"/absolute/path/to/sshepherd" logs tail lms-server --name api --lines 100

Example 3: Read-only Postgres introspection

"/absolute/path/to/sshepherd" db tables prod

prod is a pg-target name that resolves to how to reach psql on a host — never a database password. psql runs inside the target container, authenticated by peer/trust/.pgpass already on the remote.

Best Practices

  • ✅ Declare every alias/target/recipe ahead of time in ~/.ssh/config / targets.toml / recipe TOML — never inline connection details.
  • ✅ Pass only names (alias, pg-target, recipe) to the CLI; let OpenSSH own authentication.
  • ✅ Use --pretty for human review and default JSON output for machine parsing.
  • ❌ Don't try to inject a hostname, user, port, or password into a command — the CLI has no field for them.
  • ❌ Don't reach for the ssh2 npm library or hand-rolled SSH; the whole point is delegating to the trusted system ssh binary.

Limitations

  • This skill does not replace environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, or safety boundaries are missing.
  • Requires the system OpenSSH client and pre-declared aliases/targets/recipes; it cannot connect to a host that has not been configured outside the agent.
  • Postgres access is read-only introspection by design.

Security & Safety Notes

…

자주 묻는 질문

AI가 제 비밀번호나 SSH 키를 보나요?

아니요. AI는 미리 설정한 ‘별칭’만 사용합니다. 실제 연결 정보는 시스템이 안전하게 관리합니다.

AI는 어떤 서버에 접속할지 어떻게 아나요?

서버의 ‘별칭’을 설정 파일에 미리 정의해 둡니다. AI는 이 별칭을 사용해 어느 서버에 연결할지 알 수 있습니다.

서버에서 무엇이든 할 수 있나요?

서비스 관리, 로그 확인, 파일 편집, 데이터베이스 조회를 할 수 있습니다. 서버를 변경하는 작업(예: 재시작)에는 추가 확인이 필요합니다.

상세 정보

작성자의 원본 설명

Zero-knowledge SSH ops CLI — server health checks, docker/systemd control, log tailing, Postgres introspection, and declarative deploys, without ever exposing credentials to the agent.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#6302
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬