ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Remote Ssh MCP

โดย the-nine-nationรุ่น 0.2.0i★ –iรันบนเครื่อง
ชื่อใน registryio.github.the-nine-nation/remote-ssh-mcp

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Persistent stateful remote SSH sessions for AI agents via MCP + OpenSSH.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: เครื่องมือนักพัฒนา

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

ต้องเตรียมก่อน

  • npmติดตั้ง Node.js (มีคำสั่ง npx) ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "remote-ssh": {
      "command": "npx",
      "args": [
        "-y",
        "@zyluo/remote-ssh-mcp"
      ],
      "env": {
        "SSH_MCP_ALLOWED_HOSTS": "ใส่ค่าของคุณ",
        "SSH_MCP_CONFIG": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add remote-ssh --env SSH_MCP_ALLOWED_HOSTS='ใส่ค่าของคุณ' --env SSH_MCP_CONFIG='ใส่ค่าของคุณ' -- npx -y @zyluo/remote-ssh-mcp

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "remote-ssh": {
      "command": "npx",
      "args": [
        "-y",
        "@zyluo/remote-ssh-mcp"
      ],
      "env": {
        "SSH_MCP_ALLOWED_HOSTS": "ใส่ค่าของคุณ",
        "SSH_MCP_CONFIG": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "remote-ssh": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@zyluo/remote-ssh-mcp"
      ],
      "env": {
        "SSH_MCP_ALLOWED_HOSTS": "ใส่ค่าของคุณ",
        "SSH_MCP_CONFIG": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • SSH_MCP_ALLOWED_HOSTS env
    Comma-separated additional SSH Host aliases to allow
  • SSH_MCP_CONFIG env
    Path to remote-ssh-mcp config.json

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub the-nine-nation ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด เครื่องมือนักพัฒนาi

  • ดาวมากกว่า 0% ของอีก 4901 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 32% ของอีก 4901 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 4901 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Remote Ssh MCP ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.2.0) เข้า registry 3 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี GitHub, Desktop Commander, Cloudflare MCP

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

GitHub

โดย github

server ทางการของ GitHub ให้ AI อ่านและจัดการโค้ด issue และ pull request ในบัญชีของคุณได้ ใช้ผ่านคลาวด์ของ GitHub หรือรันในเครื่องด้วย Docker ก็ได้

บนเครื่องหรือคลาวด์★ 34,245MITอัปเดต 4 วันที่ผ่านมา
ติดตั้ง

Desktop Commander

โดย wonderwhy-er

MCP server for terminal commands, file operations, and process management

รันบนเครื่อง★ 10,225MITอัปเดต 16 วันที่ผ่านมา
ติดตั้ง

Cloudflare MCP

โดย cloudflare

Cloudflare MCP servers

รันบนคลาวด์★ 4,446Apache-2.0อัปเดต 14 เดือนที่ผ่านมา
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

Remote SSH MCP

Persistent, stateful remote Bash sessions for AI agents

via the Model Context Protocol

Why · Features · How it works · Tools · Quick start · Config · Security · 简体中文


Why Remote SSH MCP?

Most agents reach remote machines like this:

bash → ssh host "cmd" → disconnect → repeat

Every call pays the same tax:

PainWhat happens
🔁 Token wasteBanners, MOTD, login noise, and pwd / whoami probes flood the context
🧊 Lost statecwd, export, venv activation, and shell side effects vanish
🔌 UnstableFresh connects hit timeouts, host-key prompts, ProxyJump, and auth jitter
🌀 Error spiralThe model compensates with longer probe commands → more tokens

Remote SSH MCP turns a long-lived remote Bash into first-class MCP tools. One session ID keeps working directory, environment variables, and shell side effects. Open a new session when you need a clean environment.

Why pick this over one-shot ssh in bash?

Concrete gains for agent workflows (multi-step remote work: deploy, debug, build, inspect logs):

DimensionOne-shot ssh host "…"Remote SSH MCP
💰 TokensEach step re-pays connect noise + state probes; models often re-cd / re-pwdPay once on ssh_open; later ssh_run returns mostly command output. Structured tools + head/tail caps cut tool-result bloat. In multi-step sessions this commonly cuts remote-tool context by ~50–80% vs reconnect-every-time (exact savings depend on MOTD size and how chatty the model is).
✅ Success rate*N* steps ≈ *N* handshakes → *N* chances to fail (timeout, jump, agent, host key)One handshake per session; subsequent commands ride a live shell. Long jobs use running + ssh_peek instead of killing the tool call and restarting. Fewer reconnects → far fewer false “SSH failed” loops mid-task.
🧳 PortabilityRemote needs nothing extra — but every agent machine reimplements the same brittle ssh … patternsInstall once on the machine that runs Claude / Cursor / Grok / etc. Remote hosts install nothing (no Node, no MCP daemon, no agent). Only a normal shell account + tools already required for SSH (bash, base64, stty, …). Keys and jump hosts stay in local ~/.ssh/config.
🧠 Model ergonomicsModel invents ssh strings, escapes, and recoveryStable tools: open → run → peek → close. Session id is the only handle.
🔐 Trust boundaryEasy to over-expose keys or prompt for passwords in-bandOpenSSH client only; tools never accept passwords or private-key material

Portability in one line: put the MCP on your dev box / AI host; every server already in your SSH config is reachable — zero package install on the remote fleet.

┌─────────────────────────┐         SSH (OpenSSH)         ┌──────────────────┐

│ Your laptop / CI agent │ ───────────────────────────► │ prod / staging │ │ Claude · Cursor · Grok │ ~/.ssh/config · agent │ no MCP install │ │ + remote-ssh-mcp │ │ plain Bash OK │ └─────────────────────────┘ └──────────────────┘

Token sketch (illustrative multi-step remote debug):

One-shot path (per step × 8):

ssh wrapper + banner/MOTD + pwd/whoami + re-cd + command output → noise dominates; context fills with reconnect junk

Session path: ssh_open → once (handshake + READY) ssh_run × 8 → mostly the real stdout/stderr (truncated head+tail) → context stays on the work product, not the transport

It does not reimplement SSH. Your system OpenSSH client stays in charge — so ~/.ssh/config, known hosts, the SSH agent, ProxyJump routes, and hardware keys keep working exactly as they already do.

ssh_hosts()              → discover allowed Host aliases

ssh_open(host) → session id ssh_run(id, command) → same cwd + env as last time ssh_peek / ssh_interrupt → observe or recover long / stuck work ssh_close(id) → release the shell and connection


Features

🧠 Persistent remote sessions
  • One stable session ID maps to one long-lived remote Bash
  • `cwd` and environment survive across ssh_run calls
  • Open a fresh session whenever you need a clean slate
  • Multiple sessions can target the same or different hosts (up to maxSessions)
🔧 Native OpenSSH integration
  • Spawns the real `ssh` binary — no custom crypto stack
  • Honors `~/.ssh/config`, Include, agent sockets, and ProxyJump
  • Forces `BatchMode=yes` and `StrictHostKeyChecking=yes`
  • Never accepts passwords, private-key text, or arbitrary SSH option args from the model
📡 Long-running command friendly
  • ssh_run waits up to wait_sec (default 10s), then returns status: "running" while the remote command continues
  • Poll with `ssh_peek(wait_sec=...)` long-poll instead of busy-looping
  • Optional hard `timeout_sec` sends Ctrl-C; no automatic kill by default
  • Ideal for docker pull, builds, downloads, and deploys that must not block the tool call forever
🛡️ Safety & control plane
  • Exact Host-alias allowlist from ssh_config + optional config / env overrides
  • Patterns with *, ?, or ! are ignored
  • Fail-closed interrupt: if shell recovery cannot be confirmed after Ctrl-C, the session is closed
  • Built-in denylist for a few obviously destructive patterns (not a full policy engine)
  • Idle reaping, session caps, and a JSONL audit log (0600) with hashed commands
📦 Clean tool results for models
  • Separate `stdout` / `stderr` streams
  • Head-and-tail byte truncation with valid UTF-8 boundaries
  • ANSI / PTY noise stripped before the model sees output (colors, CSI, bracketed-paste markers, control-only blank lines)
  • Quiet open-frame: TERM=dumb, NO_COLOR, bracketed-paste off — less junk at the source
  • Slim JSON payloads: omit empty stderr, false truncation flags, and request-echo fields so dual content + structuredContent stays cheap
  • ssh_hosts returns only safe metadata: alias, hostname, user, port, proxy_jump
  • Never leaks IdentityFile, certificates, agent sockets, or ProxyCommand
🔌 MCP-native
  • stdio transport for Claude Desktop, Cursor, and other MCP hosts
  • Compatible with both legacy and current MCP handshakes
  • Parent / stdio exit closes every tracked SSH connection

How it works

flowchart LR

A[AI Agent] -->|MCP tools| B[Remote SSH MCP] B -->|spawn| C[OpenSSH client] C -->|SSH + PTY| D[Remote Bash] D --> E[(cwd / env / side effects)]

subgraph Local machine B C F[~/.ssh/config agent / keys] C -.-> F end

subgraph Remote host D E end

Typical agent flow

1. ssh_hosts()                 # pick an alias from the allowlist
  1. ssh_open(host="prod") # get session id "s_…"
  2. ssh_run(id, "cd app && …") # state sticks to this id
  3. ssh_run(id, "npm test") # still in app/, env preserved
  4. ssh_peek(id, wait_sec=20) # long-poll a slow job
  5. ssh_close(id) # clean up when done

MCP tools

ToolWhat it does
🗂️ `ssh_hosts`List allowed Host aliases (safe metadata only). Pass reload=true after editing ~/.ssh/config
🔓 `ssh_open`Open a clean persistent shell for an allowed Host alias → returns session id
▶️ `ssh_run`Run a non-interactive command in an existing session
👀 `ssh_peek`Latest N lines of output + status; optional wait_sec long-polls while running
⛔ `ssh_interrupt`Send Ctrl-C and wait for confirmed shell recovery
📋 `ssh_list`List sessions, cwd, state, idle countdown, and capacity
🔒 `ssh_close`Tear down remote temp state and close the connection
Tool parameters (essentials)
ToolKey params
ssh_openhost (required Host alias), optional name label
ssh_runid, command, optional wait_sec, optional timeout_sec
ssh_peekid, optional lines (default 50, max 1000), optional wait_sec
ssh_interrupt / ssh_closeid
ssh_hostsoptional reload boolean

Quick start

Requirements
RequirementNotes
Node.js20 or newer
OpenSSH clientSystem ssh on PATH (or set sshPath)
Remote hostBash + base64, stty, mkdir, cat, rm
SSH setupHost alias in ~/.ssh/config, host key already trusted

⚠️ First-time host-key confirmation and authentication must be completed in a normal terminal. The MCP server never shows password or trust prompts.

Install
git clone https://github.com/the-nine-nation/remote-ssh-mcp.git

cd remote-ssh-mcp npm install npm run build npm test

Run the server:

node /absolute/path/to/remote-ssh-mcp/dist/index.js

Or install from npm (once published):

npx @zyluo/remote-ssh-mcp

or

npm install -g @zyluo/remote-ssh-mcp remote-ssh-mcp

Or, after a local package install from this repo, use the remote-ssh-mcp executable.

MCP host configuration

Most stdio hosts accept a shape like this (outer key may differ by product):

{

"mcpServers": { "remote-ssh": { "command": "node", "args": [ "/absolute/path/to/remote-ssh-mcp/dist/index.js" ], "env": { "SSH_MCP_ALLOWED_HOSTS": "prod,staging" } } } }

Cursor · Claude Desktop · Claude Code · other MCP-capable hosts: point command / args at the bu

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx