Open source · Apache-2.0

只在 SSH 需要时,递交一次 OTP。 One prompt. One code. One authorized SSH session.

为授权交互式 SSH 会话提供 Bitwarden TOTP 辅助,保留可见手输回退与隔离 tmux workspace。 Bitwarden-backed TOTP assistance for authorized SSH sessions, with visible manual fallback and isolated tmux workspaces.

$npm install -g jumpotp
每条连接自动提交上限automatic submission limit
0
TOTP 种子写入TOTP seeds stored
4
macOS/Linux 架构包macOS and Linux builds
off
遥测与自动更新检查telemetry and update checks

How it works

自动化很窄,边界很清楚。Narrow automation. Explicit boundaries.

JumpOTP 不接管 SSH。它只观察真实 PTY 中配置的完整提示,在正确时刻向已解锁的 Bitwarden CLI 请求当前验证码。 JumpOTP does not own SSH. It watches a real PTY for one configured prompt and asks an unlocked Bitwarden CLI only then.

01 / MATCH

严格匹配提示Match the full prompt

使用 JumpServer preset 或有界 Go RE2 自定义规则。没有宽泛的通用 OTP 猜测。Use the JumpServer preset or bounded Go RE2. There is no broad generic OTP guess.

02 / FETCH

按需向 Bitwarden 取码Fetch from Bitwarden on demand

只有匹配发生后才调用 bw get totp。JumpOTP 不登录、不解锁,也不处理种子。Call bw get totp only after a match. JumpOTP never logs in, unlocks, or handles the seed.

03 / WRITE ONCE

只写一次,失败可手输Write once, fall back visibly

每条连接最多自动提交一次。取码失败会说明原因、恢复正常回显,并让你输入可见数字。Submit at most once. Retrieval failure is explained, normal echo returns, and visible manual digits remain available.

Real commands

从现有 SSH alias 开始。Start with the SSH aliases you already trust.

主机、用户、端口、密钥、ProxyJump 与 ControlMaster 继续留在 ~/.ssh/config。JumpOTP 配置只把 profile、target、提示规则与 Bitwarden item 绑定起来。Hosts, users, ports, keys, ProxyJump, and ControlMaster stay in ~/.ssh/config. JumpOTP binds only profiles, targets, prompt rules, and Bitwarden items.

这些命令来自公开 CLI 契约。终端没有伪造服务器输出或演示验证码。These commands come from the public CLI contract. The terminal contains no fabricated server output or demo OTP.

jumpotp / setupauthorized session
$jumpotp config init
$$EDITOR ~/.config/jumpotp/config.yaml
$jumpotp config validate
$jumpotp doctor production
$jumpotp connect production/app-01
# or: jumpotp workspace production

Choose the session shape

一次性进入,或保留一组 tmux 会话。Enter once, or keep a dedicated tmux workspace.

两种模式共用同一份 SSH 与 OTP 契约,也都可以把 sshm 作为可选 launcher。Both modes share the same SSH and OTP contract, and both can use sshm as an optional launcher.

connect

需要时直连Connect when needed

启动一个真实交互式 PTY。退出 SSH 后,JumpOTP 也随之结束,不需要后台保活。Start one real interactive PTY. When SSH exits, JumpOTP exits too, with no keepalive process.

jumpotp connect production/app-01
workspace

隔离地保留一组会话Keep a set of isolated sessions

在 JumpOTP 专用 tmux socket 中为 target 建窗口。关闭终端 tab 不会停止它,再次运行即可 reattach。Open target windows on a JumpOTP-only tmux socket. Closing a terminal tab does not stop them; rerun to reattach.

jumpotp workspace production

Security boundary

便利不是无条件的。Convenience is not free.

自动从密码管理器读取 TOTP 会降低第二因素隔离度。请只在你有权访问、理解本地信任边界的系统中使用。Reading TOTP from a password manager reduces second-factor separation. Use it only where you are authorized and understand the local trust boundary.

需要更强因素隔离时,使用 --manual,或把 fallback 设为 failWhen stronger factor separation matters, use --manual or set fallback to fail.
OpenSSH 保持权威OpenSSH remains authoritative主机密钥校验、alias 与 ControlMaster 生命周期不被接管。Host-key checks, aliases, and ControlMaster lifetime stay outside JumpOTP.
验证码不落旁路Codes avoid side channels不进入 argv、环境变量、日志、文件、剪贴板或 tmux buffer。No argv, environment variables, logs, files, clipboard, or tmux buffers.
失败回到人Failure returns control to the user默认解释取码失败并恢复可见手输,不从管道 stdin 读取验证码。Default fallback explains retrieval failure and restores visible input, never piped stdin.
tmux 范围隔离tmux scope stays isolated专用 socket 与每 profile session,不列出、修改或杀掉默认 tmux server。A dedicated socket and per-profile session never list, modify, or kill the default tmux server.

JumpOTP

让 OTP 只出现一次,只在需要的时候。Let the OTP appear once, only when the session asks.

npm 为主要分发渠道,GitHub Release 提供可校验的原生二进制备用下载。npm is the primary channel, with verified native binaries on GitHub Releases as fallback.

查看 GitHubView on GitHub npm