Cassiiopeia/projectops / skills/pro-ssh
pro-ssh
FlaggedRun commands on remote servers over SSH (AWS EC2, Synology NAS, Linux or Windows hosts), by saved name or direct host/user/key, including PowerShell and Python scripts on Windows. Use for 'check the server', 'look at logs', 'is the deploy live'.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.1 KB |
| references/troubleshooting.md | markdown | 4.0 KB |
| scripts/ssh_connect.py | script | 8.8 KB |
| scripts/windows_script.py | script | 16.2 KB |
references/troubleshooting.md
View on GitHub# Synology specifics · Windows hosts · Windows PowerShell · common pitfalls
> When to read: when the target is a Synology NAS or a Windows host, when running from Windows PowerShell, or when `launch_cli ssh` or the compatibility `ssh_connect.py` fails.
> On the first connection, `launch_cli ssh` checks the Synology docker path and records it as the `server.<server>.docker` memory.
## Synology NAS specifics
A Synology NAS differs from a regular Linux server.
| Item | Regular server | Synology NAS |
|------|-----------|--------------|
| Docker path | `docker` | `/var/packages/ContainerManager/target/usr/bin/docker` |
| curl inside containers | Usually present | Often missing → use `wget` instead |
| sudo | Usually works | Limited in non-interactive SSH |
| Default SSH port | 22 | Custom ports are common (e.g. 2022) |
**HTTP check on Synology (wget instead of curl):**
```bash
wget -q -O - --server-response http://localhost:{port}/{path} 2>&1 | head -5
```
## Windows PowerShell (including 5.x): find Python
```powershell
# Fall back from python3 to python (PowerShell 5.x has no ?.Source, so use if branches)
$py3 = Get-Command python3 -ErrorAction SilentlyContinue
if ($py3) { $PYTHON = $py3.Source }
else {
$py = Get-Command python -ErrorAction SilentlyContinue
if ($py) { $PYTHON = $py.Source }
else { Write-Error "[ERROR] Python is not installed."; exit 1 }
}
# Check that paramiko is installed
& $PYTHON -c "import paramiko" 2>$null
if ($LASTEXITCODE -ne 0) { & $PYTHON -m pip install paramiko }
```
## Windows host: scripts, quoting and output (#1189)
Run scripts with `windows_script.py run` (SKILL.md, Phase 1) instead of building `powershell -Command "…"` by hand.
| Symptom | Cause | Fix |
|------|------|------|
| `SyntaxError` from `python -c "…'…'…"` | cmd and PowerShell 5.1 strip the quotes inside the argument | `windows_script.py run --file x.py` (sent as `-EncodedCommand`, no quotes reach cmd) |
| `#< CLIXML …` (a "preparing modules for first use" progress record) in stderr | PowerShell writes progress and errors as CLIXML when stderr is redirected | `windows_script.py` turns progress off and prints errors as plain text |
| `No installed Python found!` | The `py` launcher has no Python registered for the ssh account | Let `windows_script.py` find `python.exe`, or pass `--python <path>` |
| Exit code 49 instead of 9009 | ssh passes only the low 8 bits of a Windows exit code | Compare with `exit_code % 256` |
| Korean text garbled from a PowerShell script that calls a native tool | Native tools print in the console code page (cp949) | Leave the console encoding alone in PowerShell scripts; `launch_cli` decodes cp949 |
## Common pitfalls
The symptom column shows the literal message `ssh_connect.py` prints.
| Symptom | Cause | Fix |
|------|------|------|
| `[ERROR] The paramiko module is missing.` | paramiko not installed | `pip install paramiko` or `pip3 install paramiko` |
| `[ERROR] Python is not installed.` | Python not installed | Install from python.org (on Windows, adding it to PATH is required) |
| `sshpass_missing` (launch_cli) | Plugin older than #987 (needed sshpass for password auth) | Update the plugin (OpenSSH `SSH_ASKPASS` path), key auth, or `ssh_connect.py` |
| `[ERROR] Authentication failed` | Wrong password or key | Check the `password` / `key_path` values in the config |
| `[ERROR] Socket error` | Wrong port or firewall | Check the config `port` and the server firewall rules |
| `[ERROR] PEM key file not found` | Wrong key_path | Enter an absolute path, `~` allowed (e.g. `~/.ssh/my-key.pem`) |
| `command not found` | Binary not on PATH | Run it by absolute path (find it first with `which`) |
| `sudo: a terminal is required` | sudo not possible in non-interactive SSH | Use the `echo '{password}' \| sudo -S {command}` pattern |
| `WARNING: UNPROTECTED PRIVATE KEY FILE` | PEM key permission problem | Run `chmod 400 {key_path}` and retry |
| `?` symbol error on Windows (`?.Source`) | PowerShell 5.x has no null-conditional operator | Use the `if ($x) { $x.Source }` pattern instead |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |