DevOps & cloud · Tool integration
ssh
/ssh
SSH 远程服务器管理。用于连接远程服务器、执行命令、SFTP 文件传输。支持会话管理、自动重连、历史记录存储。当用户需要 SSH 连接、远程执行命令、传输文件时触发。
- Author
- erixwong ↗
- Repository
- touwaka-ai-mate ↗
- Licence
- Apache-2.0
- Last repository change
- 15.10.2026
Assessment and security
95/ 100Class: good
Format20 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
- Files in this package
- 5
- Scripts
- 2
- HTML comments
- 0
- URLs in SKILL.md
- 0
Deprecation
No signals detected. Repository changed on 15.10.2026, without references to retired models or APIs.
Licence
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What to check before installing
- 2 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/db-json.js, scripts/session_manager.js
What it does and when to use it
SSH 远程服务器管理。用于连接远程服务器、执行命令、SFTP 文件传输。支持会话管理、自动重连、历史记录存储。当用户需要 SSH 连接、远程执行命令、传输文件时触发。
Arguments
/ssh [session|exec|sudo|sftp] --session ID
Original author description
SSH 远程服务器管理。用于连接远程服务器、执行命令、SFTP 文件传输。支持会话管理、自动重连、历史记录存储。当用户需要 SSH 连接、远程执行命令、传输文件时触发。
How it works
- 核心工具(4 个)
- 工具详情
- 典型工作流程
- 安全说明
- 存储
- 依赖
Original SKILL.md headings · 155 lines, 458 words
SKILL.md preview
---
name: ssh
description: "SSH 远程服务器管理。用于连接远程服务器、执行命令、SFTP 文件传输。支持会话管理、自动重连、历史记录存储。当用户需要 SSH 连接、远程执行命令、传输文件时触发。"
is_resident: 1
argument-hint: "[session|exec|sudo|sftp] --session ID"
user-invocable: false
allowed-tools: []
---
# Status
Frozen draft. This skill is intentionally not discoverable by `scanSkillsDirectory()` because it has no `index.js` / `index.py` entrypoint.
Do not register or enable it until the resident-process contract, permission boundary, credential handling, and user-facing audit trail are reviewed. See `STATUS.md`.
# SSH - 远程服务器管理
基于会话的 SSH 客户端,支持同步命令执行和 SFTP 文件传输。
## 核心工具(4 个)
| 工具 | 说明 | 关键参数 |
|------|------|----------|
| `session` | 会话管理(连接/断开) | `operation`, `host`, `username`, `session_id` |
| `exec` | 执行命令(同步) | `session_id`, `command` |
| `sudo` | sudo 执行 | `session_id`, `command`, `password` |
| `sftp` | SFTP 文件传输 | `session_id`, `operation`, `remote_path`, `local_path` |
## 工具详情
### session
会话管理(连接/断开)。
**参数:**
- `operation` (string, required): 操作类型 - `connect` | `disconnect`
- `host` (string, optional): 主机地址(IP 或主机名)- connect 操作需要
- `username` (string, optional): SSH 用户名 - connect 操作需要
- `port` (number, optional): SSH 端口,默认 22 - connect 操作需要
- `password` (string, optional): 密码认证 - connect 操作需要
- `private_key` (string, optional): 私钥文件路径(支持 `~` 展开)- connect 操作需要
- `passphrase` (string, optional): 加密私钥的密码 - connect 操作需要
- `session_id` (string, optional): 会话 ID - disconnect 操作需要
**返回(connect 操作):**
```json
{ "success": true, "operation": "connect", "session_id": "sess_abc123..." }
```
**返回(disconnect 操作):**
```json
{ "success": true, "operation": "disconnect", "message": "Disconnected" }
```
### exec
在远程服务器上执行命令(同步阻塞,直接返回输出)。
**参数:**
- `session_id` (string, required): 会话 ID
- `command` (string, required): 要执行的命令
- `timeout` (number, optional): 超时时间(毫秒),默认 60000
**返回:**
```json
{
"success": true,
"exit_code": 0,
"stdout": "命令输出...",
"stderr": ""
}
```
### sudo
使用 sudo 权限执行命令。
**参数:**
- `session_id` (string, required): 会话 ID
- `command` (string, required): 要执行的命令(不含 sudo 前缀)
- `password` (string, required): sudo 密码
- `timeout` (number, optional): 超时时间(毫秒),默认 120000
**安全特性:**
- 密码在输出中被掩码(替换为 `********`)
- 支持自动密码提示检测
### sftp
SFTP 文件传输(支持 list/download/upload 操作)。
**参数:**
- `session_id` (string, required): 会话 ID
- `operation` (string, required): 操作类型 - `list` | `download` | `upload`
- `remote_path` (string, optional): 远程文件路径
- `local_path` (string, optional): 本地文件路径
- `path` (string, optional): 远程目录路径(用于 list 操作)
**返回(list 操作):**
```json
{
"success": true,
"operation": "list",
"path": "/home/user",
"entries": [
{ "filename": "example.txt", "type": "file", "size": 1234, "mode": "0644" }
]
}
```
**返回(download/upload 操作):**
```json
{
"success": true,
"operation": "download",
"remote_path": "/remote/file.txt",
"local_path": "/local/file.txt",
"bytes_transferred": 1234
}
```
## 典型工作流程
```
1. ssh_session (connect) → 保存返回的 session_id
2. ssh_exec → 执行命令,直接获取输出(同步)
3. ssh_sudo → 执行需要提权的命令
4. ssh_sftp → 文件传输(operation: list|download|upload)
5. ssh_session (disconnect) → 关闭连接
```
## 安全说明
**Session ID 是能力令牌,请像密码一样对待!**
- 知道 Session ID = 拥有该连接的完全控制权
- LLM 必须在对话上下文中保存 Session ID
- 丢失 Session ID = 丢失访问权限(出于安全考虑无会话列表功能)
- 不要在公开场合暴露完整 Session ID(仅显示前 8 个字符用于识别)
## 存储
使用 JSON 文件存储,无需数据库依赖:
```
data/
├── sessions.json # 会话索引
└── sessions/
├── sess_xxx.json # 主文件(最近 50 条命令)
├── sess_xxx.1.json # 归档文件 #1(~100KB)
└── sess_xxx.2.json # 归档文件 #2
```
**安全特性:**
- 密码不会保存到磁盘(仅私钥认证会话可恢复)
- 归档文件自动管理,每个文件最大 100KB
- 主文件自动循环,保留最近 50 条命令
## 依赖
- Node.js 18+
- ssh2 包(项目已安装)
Files in this package (5)
- SKILL.md 5 KB
- STATUS.md 1 KB
- TODO.md 2 KB
- scripts/db-json.js 23 KB
- scripts/session_manager.js 23 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · erixwong/touwaka-ai-mate | 95 | Apache-2.0 |
| TerminalSkills/skills | 100 | Apache-2.0 |
| OpenHands/extensions | 100 | MIT |
| ayasy-el/ssh_mcp | 100 | MIT |
| HelixDevelopment/agent | 100 | MIT |
| Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations | 100 | MIT |
| Tyler-R-Kendrick/agent-skills | 100 | MIT |
Database snapshot: 13.11.2026 · package version 70e1f4bce5a1 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 95ssh-cheatsheet
Use when the user needs SSH commands: key generation and ssh-agent, the ~/.ssh/config file, port forwarding and tunnels with -L, -R and -D, ProxyJump jump hosts, scp and sftp file transfer, and debugging or hardening connections. - 100ssh-remote-connection
SSH connection to remote servers. Use when you need to execute commands on a remote server, check logs, restart services, or manage Docker containers. - 100ssh-connect
让 Claude 知道并使用「本机已经能 SSH 连到我的远程机器」这项能力:连上已登记的远程主机、在其上放手执行命令,并把连接经验(主机清单 / 排查结论 / 远端工作流套路)像 web-search 一样沉淀进 experience.local.md,越用越聪明。触发:用户说『连一下 mac mini / 在远程跑 xxx / 帮我登上那台机器 / 远端机器 …』,或任何需要在某台远程主机上执行命令的场景。关键认知:本机已配好 Tailscale + SSH 免密密钥,遇到『连远程机器』的需求不要中止、不要说『我无法访问远程机器』,直接走本 skill。 - 95winkterm-remote
远程操作 WinkTerm —— 默认用 MCP 或 winkterm CLI(WebSocket 长连接,长任务不被反代超时切断),HTTP 仅在 CLI 不可用时兜底。管理 SSH 连接(增删改查)、新建本地/SSH 终端、发命令并读输出、获取终端快照、SSH 文件传输。当需要远程执行 shell 命令、运维服务器、或在受控终端里跑命令时使用。 - 100sftp-ssh-port-forwarding-tunnels
Use this skill when creating local (-L), remote (-R), and dynamic (-D) encrypted SSH tunnels to bypass network boundaries. - 90ssh-gateway
Use when any task needs to run commands on, read or transfer files from, or document a remote server through the SSH Gateway tools of the Athenode MCP server (exec, jobs, files, connection descriptions, services and health checks).