# Server Access

> Accesses named servers over SSH via a local creds file, runs safe or delegated checks. Use to check a server by name, inspect Docker/container state remotely, verify health over SSH, or use creds from ~/.systemcraft/ssh/creds.yml.

- Skill: `rockclaver/server-access` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add rockclaver/server-access`
- Raw SKILL.md: https://api.skillmd.com/api/skills/rockclaver/server-access/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: rockclaver (https://skillmd.com/u/rockclaver)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/rockclaver/server-access

---


# Server Access

Resolve a named server, SSH in, and run the smallest command that answers the question.

## Workflow

### 1. Resolve the server
Credentials file: `~/.systemcraft/ssh/creds.yml`
```yaml
servers:
  - name: Server 1
    host: 203.0.113.10
    user: root          # optional; default: current user or ssh config default
    key: ~/.ssh/id_ed25519   # optional; omit to use default SSH key selection
```
Required: `name`, `host`. Optional: `user`, `key`. Unknown server? Ask for the correct name or file.

### 2. Use the helper script
```bash
python3 <skill-dir>/scripts/server_access.py --config ~/.systemcraft/ssh/creds.yml inspect --server "Server 1" -- "hostname"
```
```bash
# Docker stopped-container check
python3 <skill-dir>/scripts/server_access.py --config ~/.systemcraft/ssh/creds.yml docker-stopped --server "Server 1"
```

### 3. Delegate and stay read-only
Async requests ("check Server 1", "report back") get a sub-agent: resolve, run the helper script, summarize.
Safe defaults: `hostname`, `uptime`, `docker ps`, `docker ps -a --filter status=exited`, `systemctl status <service>`, `df -h`, `free -h`. No restarts/prunes/edits unless asked.

## Output format
Report server, host, and any stopped containers found.
```text
Server: Server 1 (203.0.113.10)
Stopped containers: 2
- api: Exited (1) 3 hours ago
- worker: Exited (137) 25 minutes ago

Server: Server 1 (203.0.113.10)
Stopped containers: 0
All containers currently look running or absent.
```

## Guardrails
- Treat creds as sensitive; never echo private keys.
- Prefer `BatchMode=yes` + bounded timeouts; report DNS/timeout/auth/Docker failures plainly.
- No YAML libs? Use JSON only if the file is JSON — never guess at malformed YAML.

## References
- `references/creds-example.yml` — example credentials layout.
- `scripts/server_access.py` — helper for config loading and SSH execution.

