SSH MCP Server
SSH MCP 服务器
提供 SSH 功能的模型上下文协议 (MCP) 服务器实现。此服务器允许通过 MCP 协议进行安全的远程访问和执行。
特征
使用MCP协议的SSH服务器实现
SQLite 数据库集成,实现数据持久化
TypeScript 实现类型安全和更好的开发体验
Related MCP server: Remote Command MCP Server
先决条件
Node.js(建议使用 v16 或更高版本)
npm 或 yarn 包管理器
开发所需的 TypeScript 知识
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 SSH 服务器:
npx -y @smithery/cli install @KinoThe-Kafkaesque/ssh-mcp-server --client claude手动安装
克隆存储库:
git clone <repository-url>
cd ssh-server安装依赖项:
npm install构建项目:
npm run build用法
配置
该服务器使用 SQLite 数据库 ( ssh.db ) 来存储 SSH 凭据。该数据库文件将在服务器启动时自动创建。
工具
该服务器提供以下工具:
ssh_exec
通过 SSH 执行命令。
输入参数:
host:要连接的主机。(必需)command:要执行的命令。(必需)username:用于 SSH 连接的用户名。(必需)privateKeyPath:私钥文件的路径。(必需)
示例用法:
{
"tool_name": "ssh_exec",
"arguments": {
"host": "example.com",
"command": "ls -l",
"username": "user",
"privateKeyPath": "/path/to/private/key"
}
}注意: privateKeyPath必须是私钥文件的有效路径。
添加凭证
添加新的 SSH 凭证。
输入参数:
name:凭证的名称。(必需)host:要连接的主机。(必需)username:用于 SSH 连接的用户名。(必需)privateKeyPath:私钥文件的路径。(必需)
示例用法:
{
"tool_name": "add_credential",
"arguments": {
"name": "my_credential",
"host": "example.com",
"username": "user",
"privateKeyPath": "/path/to/private/key"
}
}注意: privateKeyPath必须是私钥文件的有效路径。
列出凭据
列出所有存储的 SSH 凭据。
输入参数:
没有任何
示例用法:
{
"tool_name": "list_credentials",
"arguments": {}
}删除凭据
删除存储的 SSH 凭证。
输入参数:
name:要删除的凭证的名称。(必需)
示例用法:
{
"tool_name": "remove_credential",
"arguments": {
"name": "my_credential"
}
}启动服务器
npm start服务器将在配置的端口上开始运行(默认设置可以在源代码中修改)。
项目结构
src/——源代码目录build/——编译后的 JavaScript 输出node_modules/——项目依赖项
依赖项
@modelcontextprotocol/sdk:MCP 协议实现sqlite3:SQLite 数据库驱动程序typescript:TypeScript 支持的开发依赖项
发展
要对项目进行更改:
在
src/目录中进行更改重建项目:
npm run build启动服务器来测试您的更改:
npm start执照
国际学习中心
贡献
分叉存储库
创建你的功能分支
提交你的更改
推送到分支
创建新的 Pull 请求
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
- Flicense-qualityFmaintenanceA secure SSH server implementation for Model Context Protocol that enables remote command execution and file operations, supporting both password and key-based authentication.57
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables remote execution of shell commands across different operating systems, automatically handling platform-specific differences between Windows and Unix-like systems.1MIT
- AlicenseBqualityDmaintenanceA server that enables remote command execution over SSH through the Model Context Protocol (MCP), supporting both password and private key authentication.192MIT
- FlicenseAqualityDmaintenanceA local Model Context Protocol server that allows LLMs to securely execute shell commands on remote Linux and Windows systems via SSH connections.6292
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
MCP (Model Context Protocol) server for Appwrite
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/KinoThe-Kafkaesque/ssh-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server