Conning

io.github.EranYonai由 GitHub 帳號 EranYonai 發布v0.6.5更新於 Oct 29, 2026

Run commands on your remote test machines over SSH without the agent ever seeing a secret.

概覽

AI 產生的概覽

本機 SSH 控制器,讓助理在不接觸金鑰的情況下列出目標、執行指令、讀取作業輸出,並在遠端測試機上複製檔案。

可以做什麼
  • 列出已設定的 SSH 目標及其系統、shell、主機、使用者、標籤與核准模式,絕不傳回密鑰
  • 在單一目標、目標清單或某個標籤上執行指令或 argv,先傳回結束碼,長工作則傳回作業 id
  • 以長輪詢讀取作業輸出、分頁檢視已儲存的輸出,或讀取遠端檔案
  • 在本機路徑與目標之間複製檔案,並以 sha256 驗證
  • 白名單以外的指令會等待人工核准,可在助理用戶端、conn watch 或終端機中回覆
適用情境
適合需要讓助理透過 SSH 操作遠端測試機或實驗機、執行長時間工作並取回輸出,或傳輸檔案的情境,同時由你掌握憑證並核准有風險的操作。
執行需求
以 stdio 在本機執行;可用 uv tool install 或 pipx 安裝,也可用 uvx conning mcp 直接執行,或使用 Docker 映像。目標機需開放 inbound SSH;Windows 目標需要 OpenSSH 與 PowerShell 7。密鑰來自作業系統鑰匙圈、op:// 參照、env: 參照或 ssh-agent。新增與核准目標、將目標切換為 auto 模式需要人工終端機。
安裝前請注意
助理會取得對機器的真實 shell 存取權:auto 模式下任何指令都會直接執行,shell 包裝指令與 shell 語法則一律需要核准。從助理工作階段新增的目標在人工核准前維持待核准狀態。遠端輸出被視為不可信,並在儲存前去識別化,但指令仍可能修改或刪除目標上的資料。稽核日誌可偵測竄改,但並非無法竄改。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Conning,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Conning

[Handler, the Conning mascot: a friendly cartoon glove working puppet strings on three lab VMs]

A light, local SSH controller for humans and agents. Conning is one small CLI and MCP server on your own machine. It runs commands, long jobs and file copies on your test machines over plain OpenSSH. You drive it from a terminal; your agent (Claude Code, Codex, Cursor...) gets the same four commands as MCP tools, with identical output. Conning holds the keys, so the agent never sees a password, and you approve anything risky.

sh
conn targets add lab --host 10.0.0.5 --user tester   # asks for the rest, pins the host keyconn run lab uname -a                                 # exit code first, then the outputconn run -t lab apt upgrade                           # you, at a terminal: live, like ssh -tconn ssh lab                                          # you: a shell there, same login and jump hostsconn targets mode lab auto                            # optional: let the agent run anything there

Status: early (0.6). Linux, macOS and Windows targets work, with long jobs, transfers, jump hosts and approvals. See docs/design.md for every decision so far.

What it is

  • Light. One Python package and no daemon: the MCP server runs on stdio when your agent starts it. Four tools cost about 1k tokens a turn. Results lead with the exit code and are capped at 8 KB by default, with a handle to page the rest; fan-out to many targets collapses identical results.
  • Local. It runs next to you and your agent. Targets only need inbound SSH, and nothing gets installed on them. Secrets stay where they are (OS keychain, op://, ssh-agent): the target file holds references, and no tool ever returns a secret.
  • SSH. Plain OpenSSH underneath, never your ~/.ssh/config: a generated config per target, pinned host keys, forwarding off, jump hosts. Windows targets need OpenSSH and PowerShell 7.
  • For humans and agents. Each target has a mode, ask or auto. In ask, read-only commands and your allow rules run, and anything else waits for you; "always allow" remembers two words, so systemctl status never lets through systemctl stop. Only you grant trust: in the agent client's prompt, in conn watch or at your terminal.

Install

sh
uv tool install conning        # or: pipx install conningconn mcp install claude        # or codex, cursor, opencode, pi: adds the server, its skill, and denies raw ssh/scp

For Tab completion that reads the target (its files, commands and shell history), run conn completion install once; it adds one line to your bash, zsh or fish rc file, and conn doctor reminds you if it's missing. Set history = false on a target to keep its shell history out (D53).

The MCP server needs no install at all:

sh
claude mcp add conning -- uvx conning mcp

Or run the server in Docker

sh
docker run -i --rm --network host \  -v ~/.config/conning:/conning \  -v "$SSH_AUTH_SOCK":/ssh-agent -e SSH_AUTH_SOCK=/ssh-agent \  ghcr.io/eranyonai/conning:latest

The image carries Python, the OpenSSH client and Conning, and nothing else. Targets, pinned host keys and job output live on the /conning volume, and conn runs as that folder's owner, so files it writes there stay yours on the host. On Docker Desktop for Mac, forward the agent with -v /run/host-services/ssh-auth.sock:/ssh-agent instead. Two things stay on your machine (D46):

  • Approving. conn targets add, conn approve, conn allow and turning on auto need your terminal. Install the CLI on the host and point it at the same folder: CONNING_HOME=~/.config/conning conn approve a:1. Approving in the agent client works from the container as usual.
  • Secrets. The OS keychain is not reachable from a container, so use env: or op:// references, or forward your ssh-agent as above and use a key. docker run --rm ... conning doctor checks the rest.

Targets on a lab LAN or VPN need --network host (Linux) or a route the container can use.

The agent's four tools

ToolWhat it does
targets(filter?, check?)One line per target: name, OS, shell, host, user, tags, mode. Never a secret.
run(target, cmd | argv, wait=30, max_bytes=8192, ...)Runs on one target, a list or tag:<tag>. Exit code first. Still running after wait seconds: returns a job id (wait=0 is async).
read(id, wait?, range?, grep?, signal?)Long-polls a job for new lines, pages a saved output, or reads a remote file.
transfer(source, dest)Copies files between local:<path> and <target>:<path>, checked by sha256.

Agents without MCP can use the same commands through the conn CLI; the output is identical.

For agents: CLI reference

This block is generated by conn help --markdown, so you don't need to call --help. A test keeps it in sync with the code.

# Agent commands (same output as the MCP tools)
conn targets [--check] [filter]    List targets: name, OS, shell, host, user, tags, mode. Never secrets.
conn run [--wait WAIT] [--timeout TIMEOUT] [--cwd CWD] [--shell] [-t]                [--max-bytes MAX_BYTES] [--grep GREP]                target [argv ...]    Run a command on one target, a list, or tag:<tag>. Exit code first.
conn read [--wait WAIT] [--range RANGE] [--grep GREP] [--signal {INT,TERM,KILL}]                 [--max-bytes MAX_BYTES]                 id    Page a job (new lines only), a saved output, an approval, or a remote file.
conn transfer source dest    Copy files: local:<path> to <target>:<path>, or back. sha256 checked.
# At a terminal
conn ssh target    Human only: an interactive shell on a target, with its login, key, port and jump hosts.
# Targets (conn targets <verb>)
conn targets add [--host HOST] [--user USER] [--like TARGET] [--port PORT]                        [--jump TARGET] [--auth {ssh-agent,key,password}] [--secret SECRET]                        [--key KEY] [--os {linux,windows,darwin}] [--mode {ask,auto}] [--tag TAG]                        name    Add a target. Without a terminal it is saved as pending until a human approves it.
conn targets import [--match MATCH]    Import hosts from ~/.ssh/config as pending targets (unsafe options dropped).
conn targets test name    Probe a target: reachability, OS, shell, pinned host key.
conn targets mode target [{ask,auto}]    Show or set ask or auto; auto runs anything without asking and needs a human.
conn targets rename old new    Human only: rename a target; its host keys, password and pending work follow.
conn targets rm name    Remove a target and its pinned host key.
# Trust
conn approve [--always] what    Human only: make a target live, or allow a pending command a:<id>.
conn allow target [words ...]    Human only: let a command run without asking (no words: list the rules).
conn deny target words [words ...]    Remove an allow rule, so the command asks again (no terminal needed).
# This machine
conn watch [--history HISTORY] [--no-prompt]    Live control room: every command on every target, job output, approval prompts.
conn doctor    Check this machine's setup: config and state dirs, ssh, keychain, targets.
conn mcp [--approve-in-client | --no-approve-in-client] <serve|install> ...    Run the MCP server on stdio, or install it into an agent client.
conn completion {bash,zsh,fish,install}    Tab completion that reads the target; conn completion install turns it on in your shell.
conn help [--markdown]    Show this help; --markdown prints the block cached in README.md.

A target is one login on one machine. To use the same machine as another user, add it again: conn targets add lab-tester --like lab --user tester copies the host, port, OS and tags and asks for the new user's password. conn targets shows which user each target uses.

A target behind a bastion names it as its jump host: add the bastion as a target first, then conn targets add lab --host 10.0.0.5 --user tester --jump gw. Every hop gets its own login and its own pinned host key, and conn targets import keeps a ProxyJump to another host it imports. The bastion is a target the agent can see too; in ask mode it can only run read-only commands there without you.

A target you add with conn targets add from an agent session is saved as pending. It does nothing until the human runs conn approve <name>, which shows the host, the pinned host-key fingerprint and where the secret comes from.

A command outside a target's allowlist returns status=pending_approval id=a:<id>, and a desktop notification tells the human. They answer in one of three places (allow once, always allow its first two words, or deny), and the agent picks up the result with read a:<id>:

  • In the agent client: any MCP client that supports elicitation shows the question before the command is queued, and an approved command runs in the same call. Clients without it fall back to the two below. If a client would answer such prompts by itself instead of asking you, run the server as conn mcp --no-approve-in-client.
  • In conn watch, which also shows every command and its output as it happens.
  • With conn approve a:<id> in any terminal. When you run conn run yourself at a terminal, it just asks you there and prints the result.

read a:<id> long-polls only while a conn watch is open. With nobody watching, it returns at once with nobody is watching: ask the user to run conn approve a:<id>, so the agent asks you instead of waiting out its timeout for an answer no one was asked for.

Read-only commands such as uname, hostname, df, ps, ls, ip addr, systemctl status and journalctl run without asking on every target; each is checked so its changing forms (hostname x, ip addr add) still ask, and safe = false in a target's entry turns the list off. conn allow <target> make test lets another command run without asking from then on; conn deny takes it back. Every command, answer and rule change lands in a hash-chained audit log, and conn doctor checks your setup when something doesn't work.

Safety model

ModeWhat the agent can doDefault for
askThe built-in read-only list and allowlisted commands run; anything else waits for your approval.every new target
autoAny command runs without asking, until you set the mode back to ask. conn doctor warns about it.never by default
  • No tool returns a secret, adds a live target or changes policy.
  • Secrets travel over stdin or the SSH channel's env, never argv. Output is redacted before it is saved.
  • Remote output is marked untrusted. Shell wrappers (sh -c, python -c, sudo...) and shell syntax (;, |, $(...)) always ask.
  • conn mcp install also denies the agent raw ssh/scp and conn ssh, so it can't go around Conning (pi has no permission rules, so there it only adds the server).
  • The audit log is hash-chained. It runs as your user, so it is tamper-evident, not tamper-proof.

Development

sh
uv syncuv run pytest --cov=conning      # CI requires 95% coverage on Linuxuv run ruff check && uv run ruff format --check

The end-to-end tests drive the real conn and MCP server against a throwaway local sshd (Linux, root to start it; CI's e2e job does this on every push):

sh
eval "$(sudo sh tests/e2e/start-sshd.sh /tmp/conning-sshd | sed 's/^/export /')"uv run --with keyrings.alt pytest -m e2e   # keyrings.alt: a file keychain for typed passwords

After changing the CLI, refresh the README block with uv run conn help --markdown.

Docs

Why Python

Python is the easiest thing to install on a developer's machine and the language most of the AI tooling around it is written in. uvx conning mcp runs with no prior install, pip/pipx/uv are already there, and the MCP SDK, keychain bindings and agent clients all live in the same ecosystem. Go or Rust would give a single binary, but Conning drives the real OpenSSH binary and mostly waits on the network, so their speed buys little here.

License

Apache-2.0

來源:README.md,提交 f9da2d0

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

5
  1. v0.6.5最新Oct 29, 2026
  2. v0.6.4Oct 20, 2026
  3. v0.6.3Oct 19, 2026
  4. v0.6.2Oct 17, 2026
  5. v0.6.0Oct 17, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分