ssh-cli

A command-line tool for working with another computer over SSH, the standard secure connection method for remote machines. It can run commands and handle files on the remote host.

In plain words
What is it for?
Use it to execute commands, read or edit remote files, list directories, upload or download files, and diagnose a remote development machine or server.
Why use it?
It avoids switching between separate SSH and file-transfer commands for routine server work. It also provides a connection test when access or networking is uncertain.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/konghayao/peri/ssh-cli
Any agent
npx skills add KonghaYao/peri --skill ssh-cli
Clone the repo
git clone --depth 1 https://github.com/KonghaYao/peri

Made for: Claude Code, Codex.

Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,591 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00062 $0.01591
Opus 5 $0.00031 $0.00796
Sonnet 5 $0.00012 $0.00318
Haiku 4.5 $0.00006 $0.00159

Measured 2d ago against content hash 76355558b997, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ssh-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/ssh-cli.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/ssh-cli/SKILL.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 退出:

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>;其余子命令参数与单次调用一致。所有命令照常受白名单/审计约束。

参数约定

  • hostuser@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_CLI_TIMEOUT / SSH_CLI_PORT / SSH_CLI_AUDIT_LOG / SSH_CLI_STRICT_HOST_KEY
  • 退出码:exec 远程非零退出返回同码;超时 124;其他错误 1 —— 可用于判断成败

账号密码登录(无 key 的机器)

ssh-cli 不支持密码认证(脚本禁止接触密码,BatchMode=yes 强制 key/agent)。遇到需要账号密码的主机,先让用户执行 ssh-copy-id 一次性导入 key(密码只在此刻、在用户自己的终端输入,不经过任何脚本):

# 用户终端执行(只需一次):
ssh-copy-id [email protected]        # 输入账号密码 → 之后全免密

指引流程:ssh-copy-id 报错或用户没配 key 时,提示先 ssh-keygen -t ed25519 再执行;导入后所有 ssh-cli 子命令直接可用。

工作流

1. 先诊断再操作

未知/新主机先 test,确认连通性与认证:

node .claude/skills/ssh-cli/scripts/ssh-cli.js test [email protected]

Read the full file on GitHub · 117 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 117 lines · 62 tokens per session scan A 76355558b997

Subscribe to this mod's changes

ssh-cli is a skill published in the GitHub repository KonghaYao/peri (157 stars, last pushed 3d ago), licensed Apache-2.0. It adds 62 tokens to every session and 1,591 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

qa-testing

Verify your work by actually operating the app or website you changed, instead of assuming it works. Strongly recommended whenever you build, modify, or debug a web app, website, or desktop GUI app. Drive real browsers with the agent-browser CLI and native desktop apps with the cua-driver CLI. These are installed on…

openinterpreter/openinterpreter · 77 tokens

plugin-creator

Create and scaffold plugin directories for Codex with a required .codex-plugin/plugin.json, optional plugin folders/files, valid manifest defaults, and personal-marketplace entries by default. Use when Codex needs to create a new personal plugin, add optional plugin structure, generate or update marketplace entries…

openinterpreter/openinterpreter · 86 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openinterpreter/openinterpreter · 113 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openinterpreter/openinterpreter · 114 tokens

skill-creator

Create or update a Codex skill with appropriately scoped instructions and any needed supporting resources.

openinterpreter/openinterpreter · 21 tokens

codex-pr-body

Update the title and body of one or more pull requests.

openinterpreter/openinterpreter · 17 tokens