ssh-cli

Solid

Execute commands and manage files on remote machines over SSH via a zero-dependency Node CLI (ssh-cli.js). Use when the user needs to run commands, read/write/edit files, or diagnose connectivity on a remote host, or asks for anything "on the server / remote machine / dev box".

Data & Documents 165 stars 30 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 86/100

Stars 20%
74
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# SSH CLI 通过系统 `ssh` 二进制操作远程机器。单文件零依赖 CLI,无需安装任何东西: ``` node .claude/skills/ssh-cli/scripts/ssh-cli.js <子命令> ... ``` ## 子命令 | 子命令 | 用途 | 示例 | | --- | --- | --- | | `exec` | 远程执行命令(支持管道/&&/重定向) | `exec dev-server "cd /app && npm test"` | | `read` | 读远程文本文件(可只读行区间) | `read dev-server /etc/hosts --offset 5 --limit 10` | | `write` | 写/追加远程文件 | `write dev-server /app/.env "KEY=value"`(追加加 `--append`,长内容用 `--stdin`) | | `edit` | 精确替换(old_string 必须唯一,多匹配加 `--all`) | `edit dev-server /app/main.js "old" "new"` | | `ls` | 目录列表 | `ls dev-server /app` | | `push` | 本地上传远程(scp,`--recursive` 传目录) | `push ./dist dev-server /srv/app/dist` | | `pull` | 远程下载本地(scp) | `pull dev-server /var/log/app.log ./app.log` | | `test` | 连接诊断(主机名/系统/连通性) | `test dev-server` | ## 交互模式(推荐) 连续操作同一台主机时,直接 `ssh-cli <host>` 进入主机上下文,之后只敲子命令(host 自动带入),`exit` 或 Ctrl-D 退出: ```bash node .claude/skills/ssh-cli/scripts/ssh-cli.js dev-server # dev-server> exec "cd /app && npm test" # dev-server> read /etc/hosts --limit 10 # dev-server> push ./dist /srv/app/dist --recursive # dev-server> pull /var/log/app.log ./app.log # dev-server> exit ``` 交互模式下 `push`/`pull` 省略 host:`push <local> <remote>`、`pull <remote> <local>`;其余子命令参数与单次调��一致。所有命令照常受白名单/审计约束。 ## 参数约定 - `host`:`user@host` 或 `~/.ssh/config` 别名;凭据只走系统 ssh(config/agent/key),**密码不进入脚本**(需要账号密码的机器先 `ssh-copy-id`) - 全局选项:`--hosts <白名单>`(逗号分隔,`*` 放行所有;不传默认放行)、`--timeout <ms>`、`--port <n>`、`--key <path>`、`--audit-log <path>` - 环境变量:`SSH_CLI_ALLOWED_HOSTS` / `SSH_CL...

Details

Author
KonghaYao
Repository
KonghaYao/peri
Created
5 months ago
Last Updated
today
Language
Rust
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

ssh-remote

远程机器:SSH 免密密钥(ssh-keygen/ssh-copy-id/authorized_keys)、非交互执行与本地/远程管道、 scp/rsync 传输、~/.ssh/config 主机别名与端口转发、mosh。Use when the user asks to connect to a remote server, set up SSH keys, copy files to/from a server, or write ssh config. 触发于「连服务器/配 SSH 密钥/传文件到服务器/写 ssh config」。

1 Updated 1 weeks ago
AntheaLaffy
AI & Automation Listed

hssh-agent

通过 hssh 的本地 Agent 接口(REST API / MCP)控制 SSH 会话与 GUI 终端窗口。当用户要求在远程服务器上执行命令、上传/下载文件、读取 SSH 终端输出、或让 AI 接管 hssh 里打开的 SSH 窗口时触发此 skill。

1 Updated 1 months ago
hyyy-y
AI & Automation Listed

ssh-connect

让 Claude 知道并使用「本机已经能 SSH 连到我的远程机器」这项能力:连上已登记的远程主机、在其上放手执行命令,并把连接经验(主机清单 / 排查结论 / 远端工作流套路)像 web-search 一样沉淀进 experience.local.md,越用越聪明。触发:用户说『连一下 mac mini / 在远程跑 xxx / 帮我登上那台机器 / 远端机器 …』,或任何需要在某台远程主机上执行命令的场景。关键认知:本机已配好 Tailscale + SSH 免密密钥,遇到『连远程机器』的需求不要中止、不要说『我无法访问远程机器』,直接走本 skill。

14 Updated yesterday
wangjs-jacky