ssh-mcp
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., "@ssh-mcprun 'df -h' on prod server"
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.
ssh-mcp
MCP server ที่เปิดให้ Claude (หรือ MCP client อื่น) สั่งงานเครื่องปลายทางผ่าน SSH ได้ —
รันคำสั่ง, อ่าน/เขียนไฟล์, โอนไฟล์ SFTP และเปิด shell แบบ interactive
กำหนดหลายโฮสต์ผ่านไฟล์ .env ยืนยันตัวตนด้วย username/password
ความสามารถ (Tools)
Tool | หน้าที่ |
| แสดงรายชื่อโฮสต์ที่ตั้งค่าไว้ (ไม่คืน password) |
| รันคำสั่ง คืน stdout / stderr / exit_status |
| อ่านไฟล์ปลายทางผ่าน SFTP |
| เขียน/สร้างไฟล์ปลายทางผ่าน SFTP |
| แสดงรายการไฟล์ในไดเรกทอรีปลายทาง |
| อัปโหลดไฟล์ในเครื่อง → ปลายทาง |
| ดาวน์โหลดไฟล์ปลายทาง → เครื่องนี้ |
| เปิด interactive shell คืน |
| ส่งข้อความ/คำสั่งเข้าเซสชัน แล้วคืน output |
| อ่าน output ที่ค้างในเซสชัน |
| ปิดเซสชัน |
| แสดงเซสชันที่เปิดอยู่ |
Related MCP server: MCP SSH Server
ติดตั้ง
pip install -r requirements.txt
# หรือแบบ editable พร้อม console script `ssh-mcp`
pip install -e .ตั้งค่า
คัดลอก .env.example → .env แล้วแก้ค่าโฮสต์จริง แต่ละโฮสต์เป็น "profile" ตามรูปแบบ prefix:
SSH_PROFILES=prod,staging
SSH_PROD_HOST=10.0.0.1
SSH_PROD_PORT=22
SSH_PROD_USER=root
SSH_PROD_PASSWORD=secret
SSH_STAGING_HOST=10.0.0.2
SSH_STAGING_USER=deploy
SSH_STAGING_PASSWORD=secretชื่อ profile (ตัวพิมพ์เล็ก เช่น
prod,staging) คือค่าที่ส่งเป็น argumenthostของแต่ละ toolSSH_PROFILESระบุ/จัดลำดับ profile ที่จะเปิดใช้ ถ้าเว้นว่างจะ auto-detect จากSSH_*_HOSTทั้งหมดGlobal options:
SSH_CONNECT_TIMEOUT,SSH_COMMAND_TIMEOUT,SSH_KNOWN_HOSTS_POLICY(auto_add|reject)
ความปลอดภัย:
.envอยู่ใน.gitignoreอยู่แล้ว อย่า commit ค่าจริง สำหรับ production แนะนำตั้งSSH_KNOWN_HOSTS_POLICY=reject(โฮสต์ต้องอยู่ใน~/.ssh/known_hosts)
รัน
python -m ssh_mcp.server # stdio transport
# หรือ (หลัง pip install -e .)
ssh-mcpเชื่อมกับ Claude Code / Claude Desktop
เพิ่มเข้าไฟล์ config MCP:
{
"mcpServers": {
"ssh": {
"command": "python",
"args": ["-m", "ssh_mcp.server"],
"cwd": "d:\\AI\\apos"
}
}
}ทดสอบด้วย MCP Inspector
npx @modelcontextprotocol/inspector python -m ssh_mcp.serverแล้วลองเรียก ssh_list_hosts → ssh_exec (เช่น whoami) → วงจร ssh_session_open / ssh_session_send / ssh_session_close
ตัวอย่างการใช้ interactive session
ssh_session_open(host="prod")→ ได้session_idssh_session_send(session_id, data="top\n")→ คืน output รอบแรกssh_session_send(session_id, data="q")เพื่อออกจาก topssh_session_close(session_id)
หมายเหตุ:
ssh_session_sendไม่เติม newline ให้อัตโนมัติ — ต้องใส่\nเองเมื่อต้องการกด enter
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.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables SSH operations including connecting to remote servers, executing commands, and transferring files between local and remote systems. Supports multiple SSH connections with both password and private key authentication methods.18
- FlicenseBqualityDmaintenanceEnables seamless SSH operations including secure connections, file transfers, interactive shell sessions, and Docker container management on remote servers. Supports both password and SSH key authentication with credential management and connection pooling.18
- AlicenseBqualityDmaintenanceEnables SSH connectivity and remote command execution on servers, allowing users to test connections and run commands remotely with support for both local networks and public servers.2111ISC
- AlicenseAqualityDmaintenanceEnables secure SSH connections to multiple remote servers with support for command execution, file transfers (SFTP), directory listing, and both password and key-based authentication.7MIT
Related MCP Connectors
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Operate your Linux servers from your LLM. Every action runs through an auditable allowlist.
Manage Supabase projects end to end across database, auth, storage, realtime, and migrations. Moni…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/aposadm/ssh-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server