LearnSSH 是一款 Codex 技能,附带 Node.js CLI,支持基于别名的 SSH 操作,包括远程命令执行、SFTP 文件传输、本地隧道和安全凭据管理。

Stars

26

7 天增长

暂无数据

Fork 数

2

开放 Issue

0

开源协议

MIT

最近更新

2026-07-14

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它通过隐藏提示输入来加密凭据,在建立连接前硬阻断 `rm -rf /` 等破坏性命令,既能作为 Codex 技能无缝集成,也提供独立的命令行工具。

适合谁使用

  • 需要管理远程服务器的 Codex 用户
  • 频繁执行 SSH 操作的开发者
  • 管理多台服务器的 DevOps 工程师
  • 希望加密存储凭据的安全意识强的运维人员

典型使用场景

  • 按别名执行远程命令,无需记忆主机字符串
  • 通过简单的 CLI 命令使用 SFTP 上传和下载文件
  • 创建本地 SSH 隧道以安全访问远程服务
  • 使用加密存储添加新服务器凭据,避免凭据明文出现在聊天记录中

项目优势

  • 基于别名的管理简化了服务器引用
  • 凭据加密存储且不接受命令行参数输入
  • 安全特性在连接前阻断 `rm -rf /` 类命令
  • 支持 `--json` 输出,方便机器解析

使用前须知

  • 未实现自身的远程命令审批机制(依赖 Codex 或宿主工具层)
  • 安装与 Codex 生态系统绑定(无独立 npm 包)
  • 未描述对 SSH 证书或高级认证方式的支持

README 快速开始

LearnSSH

LearnSSH is a Codex skill for SSH-based server operations. It provides a bundled Node.js CLI for alias-based remote command execution, SFTP upload/download, local tunnels, jump hosts, and secure credential onboarding.

Read this in Chinese: README_CN.md

Features

  • Manage SSH servers by alias instead of raw user@host strings.
  • Store SSH passwords, private keys, and passphrases outside chat.
  • Encrypt secrets under ~/.codex/ssh-node-ops.
  • Run remote commands with optional per-alias connection reuse.
  • Upload and download files through SFTP.
  • Start local SSH tunnels.
  • Print concise human-readable output by default, or JSON with --json.
  • Hard-block rm -rf / style root deletion before connecting.

Install Into Codex

Run:

npx --yes github:LearnAIHubC/LearnSSH

Then restart Codex and use $learn-ssh.

To update an existing installation:

npx --yes github:LearnAIHubC/LearnSSH --force

The installer copies the skill into ${CODEX_HOME:-$HOME/.codex}/skills/learn-ssh, installs its Node.js dependencies, and creates a launcher at ${CODEX_HOME:-$HOME/.codex}/bin/learn-ssh. Add that bin directory to PATH if you want to run learn-ssh without the full path. If you install with --dest, use the launcher path printed by the installer. The Codex skill name is learn-ssh. The UI display name is LearnSSH.

First-Time Setup

Initialize local encrypted storage:

"${CODEX_HOME:-$HOME/.codex}/bin/learn-ssh" init

Add a password-based server alias:

"${CODEX_HOME:-$HOME/.codex}/bin/learn-ssh" add \
  --alias prod-web-1 \
  --host 203.0.113.10 \
  --user root \
  --auth password

The real SSH password is typed only into the hidden terminal prompt. Do not pass secrets as command-line flags or paste them into chat.

Add a key-based server alias:

"${CODEX_HOME:-$HOME/.codex}/bin/learn-ssh" add \
  --alias prod-db-1 \
  --host 203.0.113.20 \
  --user ubuntu \
  --auth key \
  --key-path ~/.ssh/id_ed25519 \
  --embed-key \
  --ask-passphrase

Common Commands

List aliases:

"${CODEX_HOME:-$HOME/.codex}/bin/learn-ssh" list

Show one alias without secrets:

"${CODEX_HOME:-$HOME/.codex}/bin/learn-ssh" show prod-web-1

Run a remote command:

"${CODEX_HOME:-$HOME/.codex}/bin/learn-ssh" exec prod-web-1 -- "hostname && uptime"

Get

项目描述

LearnSSH: secure SSH server operations for Codex by alias, with remote commands, SFTP upload/download, local tunnels, jump hosts, and encrypted credentials.

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

7-e1even
精选
7-e1even GitHub avatar

learn-agent

A collection of notes on building coding agents, derived from the production development of the desktop agent Reina, with each mechanism simplified into a zero-dependency, single-file Node.js demo.

AI 与机器学习大语言模型
218
powerycy
精选
powerycy GitHub avatar

goutoujunshi

An AI relationship coach that provides emotional support, relationship science, and actionable strategies through a multidisciplinary knowledge base.

Python
1,174
programmersd21
精选
programmersd21 GitHub avatar

flow

flow is a minimalist terminal dashboard that displays real-time network throughput with smooth animations, multiple responsive modes, and zero configuration.

开发者工具CLI 与终端
277