LearnSSH is a Codex skill with a bundled Node.js CLI that enables alias-based SSH server operations including remote command execution, SFTP file transfer, local tunnels, and secure credential management.

Stars

26

7-day growth

No data

Forks

2

Open issues

0

License

MIT

Last updated

2026-07-14

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It encrypts secrets outside of chat using hidden prompts, hard-blocks destructive commands like `rm -rf /` before connecting, and integrates seamlessly into Codex as a skill while also providing a standalone CLI.

Who it is for

  • Codex users needing remote server management
  • Developers performing frequent SSH operations
  • DevOps engineers managing multiple servers
  • Security-conscious operators who want credentials stored encrypted

Use cases

  • Run commands on remote servers by alias without remembering host strings
  • Upload and download files via SFTP with simple CLI commands
  • Create local SSH tunnels to access remote services securely
  • Onboard new server credentials with encrypted storage and no plaintext in chat logs

Strengths

  • Alias-based management simplifies server referencing
  • Secrets are encrypted and never accepted as command-line arguments
  • Safety feature blocks `rm -rf /` type commands before connection
  • Supports `--json` output for machine-readable results

Considerations

  • Does not implement its own remote command approval system (relies on Codex or host tool layer)
  • Installation is tied to Codex ecosystem (no standalone npm package)
  • No explicit support for SSH certificates or advanced authentication methods described

README quick start

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

Description

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

Related repositories

Similar projects matched by category, topics, and programming language.

7-e1even
Featured
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 & Machine LearningLarge Language Models
218
powerycy
Featured
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
Featured
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.

Developer ToolsCLI & Terminal
277