skills/ssh/SKILL.md
Run shell commands on remote SSH hosts via exec:ssh. Reads targets from ~/.claude/ssh-targets.json. Use for deploying, monitoring, or controlling remote machines.
npx skillsauth add anentrypoint/gm-cc sshInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Runs shell commands on a remote host. No manual connection needed.
~/.claude/ssh-targets.json:
{
"default": { "host": "192.168.1.10", "port": 22, "username": "pi", "password": "pass" },
"prod": { "host": "10.0.0.1", "username": "ubuntu", "keyPath": "/home/user/.ssh/id_rsa" }
}
host and username required. port defaults to 22. Auth: password OR keyPath + optional passphrase.
exec:ssh
<shell command>
Named host with @name on the first line:
exec:ssh
@prod
sudo systemctl restart myapp
SSH kills child processes on close. To survive disconnect:
exec:ssh
sudo systemctl reset-failed myunit 2>/dev/null; systemd-run --unit=myunit bash -c 'your-command'
Unique unit name per launch:
exec:ssh
systemd-run --unit=job-$(date +%s) bash -c 'nohup myprogram &'
No-systemd fallback:
exec:ssh
setsid nohup bash -c 'myprogram > /tmp/out.log 2>&1' &
Requires ssh2 in ~/.claude/gm-tools. Write to .gm/exec-spool/in/nodejs/<N>.js:
const { execSync } = require('child_process');
const path = require('path');
const os = require('os');
const gmTools = path.join(os.homedir(), '.claude', 'gm-tools');
execSync('npm install ssh2', { cwd: gmTools, stdio: 'inherit' });
data-ai
AI-native software engineering via skill-driven orchestration on zed; bootstraps plugkit for task execution and session isolation
development
AI-native software engineering via skill-driven orchestration on vscode; bootstraps plugkit for task execution and session isolation
data-ai
AI-native software engineering via skill-driven orchestration on oc; bootstraps plugkit for task execution and session isolation
data-ai
AI-native software engineering via skill-driven orchestration on kilo; bootstraps plugkit for task execution and session isolation