MCP Remote Shell
Provides remote shell access to Linux systems via SSH and Telnet, enabling command execution, file transfer, and session management.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Remote ShellSSH to 192.168.1.10 and execute 'df -h'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Remote Shell
通过 SSH/Telnet 控制远程 Linux 及网络设备的 MCP 服务
传输模式:Streamable HTTP(跨机器部署) 适用于:openclaw (A机器) ──HTTP──▶ MCP Server (Windows B机器) ──SSH/Telnet──▶ 目标设备
📁 目录结构
mcp-remote-shell/
├── src/
│ ├── server.py # MCP 服务主入口(Streamable HTTP)
│ ├── ssh_handler.py # SSH 连接处理器
│ ├── telnet_handler.py # Telnet 连接处理器
│ └── connection_manager.py # 会话管理
│── openclaw_mcp_config.json # openclaw 配置示例
├── logs/ # 运行日志(自动创建)
├── pyproject.toml # uv 项目配置 & 依赖
├── install.bat # 一键安装
├── start.bat # 启动服务
├── install_service.bat # 注册为 Windows 服务(可选)
└── README.mdRelated MCP server: SSH MCP Server
🚀 部署步骤(Windows B 机器)
1. 安装依赖
cd C:\mcp-remote-shell
install.bat自动完成:安装 uv → Python 3.11 → uv sync 安装所有依赖。
2. 启动服务
start.bat服务监听 http://0.0.0.0:8080/mcp,自定义端口:
set MCP_PORT=9090
start.bat3. 开放防火墙端口
netsh advfirewall firewall add rule name="MCP Remote Shell" dir=in action=allow protocol=TCP localport=80804. 配置 openclaw(A 机器)
在 openclaw 的 MCP 配置中添加:
{
"mcpServers": {
"remote-shell": {
"type": "http",
"url": "http://<B机器IP>:8080/mcp"
}
}
}🔧 注册为 Windows 服务(开机自启,可选)
需要先下载 NSSM 并放入 PATH,然后:
install_service.bat管理服务:
nssm start mcp-remote-shell
nssm stop mcp-remote-shell
nssm restart mcp-remote-shell
nssm remove mcp-remote-shell confirm🛠️ 可用工具
工具名 | 功能 |
| SSH 连接目标设备(密码/私钥) |
| Telnet 连接目标设备 |
| 执行单条命令 |
| 批量执行命令列表 |
| 发送交互式输入(sudo、确认等) |
| 断开指定会话 |
| 列出所有活跃会话 |
| 查看会话详情 |
| SFTP 上传文件(仅 SSH) |
| SFTP 下载文件(仅 SSH) |
🐛 常见问题
Q: openclaw 连不上 MCP Server
确认 B 机器防火墙已放行端口
用
curl http://B机器IP:8080/mcp测试连通性
Q: Telnet 登录失败
华为设备提示符:
Username:/Password:思科设备提示符:
Username:/Password:在
telnet_connect中传入login_prompt/passwd_prompt参数覆盖默认值
Q: 需要认证保护 HTTP 接口 在 B 机器前面加 Nginx 反代,配置 Basic Auth 或限制来源 IP。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/oceanromain/remote-shell-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server