Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
zhinkgit avatar

Ssh

  • 267 installs
  • 534 repo stars
  • Updated June 29, 2026
  • zhinkgit/embeddedskills

ssh is an agent skill that manages OpenSSH config aliases, remote commands, scp transfers, port forwarding, and jump hosts for servers and embedded boards

About

The ssh skill is a Claude Code–oriented procedural package for everyday OpenSSH work: maintaining a single source of truth in ~/.ssh/config, resolving Host aliases, executing remote commands, moving files with scp, and setting up local port forwards or jump hosts. It targets embedded and Linux lab setups—example configs reference dev boards and bastions—but any solo builder with a few VPS or Pi nodes gets the same benefit. Scripts under ssh_config.py cover list, find, show, and add flows, with add performing a config backup first. The skill explicitly forbids storing passwords or private keys in config comments and supports optional first-connect host-key acceptance for trusted devices. No extra Python dependencies are required beyond the standard library, aligning with agents that should run deterministic CLI helpers on Windows, macOS, or Linux with an OpenSSH client installed.

  • List, find, show, and add Host entries in ~/.ssh/config with automatic backup on add
  • Remote exec and scp upload/download via Host alias with structured JSON command results
  • Local port forwarding and ProxyJump bastion patterns for internal dev targets
  • Comment metadata fields: description, tags, and location on config blocks
  • Python 3 stdlib scripts only—requires OpenSSH client (ssh, scp, ssh-keygen)

Ssh by the numbers

  • 267 all-time installs (skills.sh)
  • +24 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #354 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/zhinkgit/embeddedskills --skill ssh

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs267
repo stars534
Last updatedJune 29, 2026
Repositoryzhinkgit/embeddedskills

What it does

Manage ~/.ssh/config aliases, run remote commands, transfer files, and port-forward to lab boards or servers without memorizing host strings.

Who is it for?

Best when you're doing embedded Linux, homelab, or small VPS fleets and want alias-driven SSH, scp, and tunnels from Claude Code without a separate inventory database.

Skip if: Pure local-only frontend work with no remote hosts, or teams that mandate a commercial bastion product instead of user-managed OpenSSH config files.

When should I use this skill?

You need SSH server or Linux dev-board operations: config Host aliases, remote commands, scp, local port forwarding, or jump hosts.

What you get

Host aliases stay documented in ~/.ssh/config while the agent runs list/find/show/add, remote commands, and file sync through repeatable Python wrappers.

  • Updated ~/.ssh/config Host entries with backup on add
  • Structured JSON from remote command runs
  • Completed scp uploads or downloads

By the numbers

  • Four primary ssh_config.py operations: list, find, show, and add with backup

Files

SKILL.mdMarkdownGitHub ↗

SSH Skill

定位

这是一个轻量 SSH 操作网关。它不维护独立服务器数据库,默认只读取和写入标准 OpenSSH 配置:

~/.ssh/config

核心原则:

  • 使用 Host 别名标识服务器,不直接记忆 IP/密码。
  • 优先密钥认证和 OpenSSH 原生命令。
  • 通过本 skill 的 scripts/ 脚本执行 SSH、SCP、配置检查和隧道操作。
  • 写入 ~/.ssh/config 前必须自动备份。
  • 不鼓励密码落盘;如必须使用密码,优先让 OpenSSH 交互提示或由用户自行配置安全凭据。

何时触发

当用户提到以下任务时使用本 skill:

  • SSH、远程服务器、服务器 IP/主机名、user@host
  • 登录、执行远程命令、检查服务器状态
  • 上传、下载、部署、迁移文件
  • 跳板机、ProxyJump、内网访问
  • 隧道、端口转发、数据库连接
  • 配置 ~/.ssh/config、新增/查找服务器别名

不要用于本机 localhost、当前目录、本地文件操作或普通网络概念解释。

脚本入口

优先从当前 skill 目录调用脚本。脚本目录为:

scripts/

命令示例均以当前 skill 目录为基准。

常用命令

ssh_exec.pyssh_transfer.pyssh_tunnel.py 均支持:

--accept-new-host-key
--known-hosts-file <临时known_hosts路径>

首次连接已确认可信的新开发板时,可显式追加 --accept-new-host-key。测试时如不想写入全局 known_hosts,可追加 --known-hosts-file <临时known_hosts路径>

列出服务器

python scripts/ssh_config.py list

查找服务器

python scripts/ssh_config.py find <关键词>

验证别名解析

python scripts/ssh_config.py show <别名>

新增服务器

写入前脚本会自动备份 ~/.ssh/config

python scripts/ssh_config.py add <别名> --host <IP或域名> --user <用户> --port 22 --key ~/.ssh/id_ed25519

可选:

--description "说明"
--tags tag1,tag2
--location "位置"
--proxy-jump <跳板机别名>

执行远程命令

python scripts/ssh_exec.py <别名> "命令" --timeout 30

脚本输出 JSON,包含 successexit_codestdoutstderr

上传文件

python scripts/ssh_transfer.py upload <别名> "<本地路径>" "<远程路径>"

下载文件

python scripts/ssh_transfer.py download <别名> "<远程路径>" "<本地路径>"

建立本地端口转发

python scripts/ssh_tunnel.py <别名> --local-port <本地端口> --remote-host 127.0.0.1 --remote-port <远程端口>

隧道命令会前台运行。需要后台长期保持时,先向用户说明影响和停止方式。

配置格式

推荐配置:

# description: 开发板
# tags: embedded,linux
# location: lab
Host 1380-P904
    HostName 192.168.137.76
    User root
    Port 22
    IdentityFile ~/.ssh/id_ed25519

跳板机:

Host bastion
    HostName bastion.example.com
    User root
    IdentityFile ~/.ssh/id_ed25519

Host internal-dev
    HostName 10.0.1.20
    User root
    IdentityFile ~/.ssh/id_ed25519
    ProxyJump bastion

允许保留注释元数据:

  • description
  • tags
  • location

不要在配置中写入真实密码、Token、私钥内容或其他敏感信息。

操作规则

  • 查询类任务可以直接执行。
  • 新增或修改 ~/.ssh/config 前,脚本必须创建备份。
  • 删除配置、覆盖远程文件、部署、批量执行、端口转发等有风险操作,先向用户确认。
  • 不直接运行裸 ssh/scp,优先使用本 skill 的脚本;只有在脚本不可用或用户明确请求时,才说明原因并使用回退命令。
  • 不修改 Git、系统服务、防火墙、远程生产环境配置,除非用户明确要求。
  • 执行远程命令时优先只读检查;涉及重启、删除、覆盖、安装、升级时先确认。
  • 输出给用户时说明目标别名、实际 HostName、执行命令、关键结果和失败原因。

故障排查

优先检查:

1. python scripts/ssh_config.py show <别名> 2. ssh -G <别名> 是否能解析 HostName/User/Port 3. 密钥文件是否存在,权限是否合适 4. ProxyJump 别名是否也在 ~/.ssh/config 5. 网络是否可达,端口是否开放 6. 首次连接是否需要显式追加 --accept-new-host-key

如果脚本失败,保留真实 stderr,不要吞掉错误。

Related skills

How it compares

Prefer this skill over ad-hoc shell snippets when you need structured JSON outputs and safe config edits with backup on every add.

FAQ

Who is ssh for?

Developers and hardware hackers who SSH into servers or boards regularly and want their agent to operate through named Host aliases instead of raw IPs.

When should I use ssh?

In Operate (infra) for maintenance and tunnels, in Build (integrations/backend) when flashing or testing on a remote board, and in Ship (launch) when pushing artifacts to a staging host—whenever OpenSSH is the transport.

Is ssh safe to install?

The skill edits your real SSH config and runs remote commands; review the Security Audits panel on this page, keep secrets out of config comments, and use IdentityFile keys rather than embedded credentials.

DevOps & CI/CDdevopsintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.