
Realssh Mcp
io.github.danielecr由 GitHub 帳號 danielecr 發布v1.0.6更新於 Oct 24, 2026
MCP server for SSH remote command execution
概覽
本機 MCP 伺服器,透過系統 ssh 指令讓助理以 SSH 在遠端主機上執行命令。
- 可以做什麼
- 透過 SSH 在遠端主機執行任意指令,並取回標準輸出、標準錯誤與結束碼
- 在正式執行前測試與某台主機的 SSH 連線是否正常
- 每次呼叫可指定主機、使用者名稱、連接埠、逾時、代理轉送與額外 ssh 參數
- 沿用既有的 ssh-agent 金鑰、~/.ssh/config 別名、跳板主機與 ProxyCommand 設定
- 適用情境
- 適合想讓助理用你電腦上現有的 SSH 設定去檢視或操作遠端伺服器的情境,例如在 SSH 設定中列出的主機上查看磁碟用量、服務狀態或日誌。
- 執行需求
- 以本機 stdio 程序執行,可從 npm 全域安裝或由原始碼建置,npm 套件需要 Node.js。系統必須安裝 ssh 指令並位於 PATH 中(macOS 與 Linux 通常內建)。主機、金鑰與跳板主機來自既有的 ~/.ssh/config 與 ssh-agent;未宣告任何 API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Realssh Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
SSH Real MCP Server
A Model Context Protocol (MCP) server that enables SSH remote command execution by delegating entirely to the system ssh binary. This means ssh-agent, ProxyCommand, ~/.ssh/config, jump hosts, and every other OS-level SSH feature work out of the box — no Node.js crypto, no native addons.
How it works
Instead of implementing the SSH protocol in Node.js, this server spawns ssh as a child process and pipes the output back to the MCP client. Authentication, key discovery, and connection routing are handled by your OS, exactly as if you ran ssh yourself in a terminal.
Requirements: ssh must be installed and available in PATH (standard on macOS and Linux).
Features
- Zero auth config — uses your existing
ssh-agent,~/.ssh/config, and key files automatically - ProxyCommand / jump hosts — works natively, no special parameters needed
- Connectivity test —
ssh_testtool to verify reachability before running commands - Argument injection protection — host and username are validated before being passed to
ssh - Configurable timeout — commands are killed and an error is returned if they exceed the timeout
- Detailed results: stdout, stderr, and exit code
Installation
From npm
From source
VS Code / Copilot configuration
After installing the package globally, add the server to your MCP configuration. In VS Code, open the MCP config file via Command Palette → MCP: Open User Configuration and add:
Then run MCP: List Servers to verify the server is active.
Tools
ssh_execute
Execute a command on a remote server via SSH.
Parameters:
host(string, required): SSH server hostname or IP addresscommand(string, required): Command to execute on the remote serverusername(string, optional): SSH username. Defaults to the current OS userport(number, optional): SSH server port (default: 22)timeout(number, optional): Command timeout in milliseconds (default: 30000)agentForward(boolean, optional): Enable SSH agent forwarding-A(default: false)extraArgs(string[], optional): Extra SSH arguments (e.g.,["-o", "StrictHostKeyChecking=no"])
Example:
ssh_test
Test SSH connectivity to a remote host (runs echo ok and checks the response).
Parameters:
host(string, required): SSH server hostname or IP addressusername(string, optional): SSH usernameport(number, optional): SSH server port (default: 22)extraArgs(string[], optional): Extra SSH arguments
Host configuration
Hosts, aliases, jump hosts, and identity files are configured in ~/.ssh/config — not in the MCP server. This is intentional: the OS ssh binary reads that file natively.
Example ~/.ssh/config:
With the above config, "host": "prod" works with no extra parameters.
Security considerations
- Commands are executed on remote systems with the privileges of the SSH user — ensure proper access controls on the remote side.
BatchMode=yesis set by default, preventing thesshprocess from hanging on interactive prompts.- Host and username inputs are validated to prevent SSH option injection.
- Command output may contain sensitive data; treat it accordingly.
License
MIT
來源:README.md,提交 5fc08f6
工具
0版本歷史
1- v1.0.6最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。