ssh-mcp-server安装及调用AI自动分析服务器
一、下载ssh-mcp-server
下载地址:https://github.com/classfang/ssh-mcp-server
存到 D:\software\MCP\ssh-mcp-server 路径
二、安装
这是一个 Node.js 项目,安装步骤如下:
- 确保已安装 Node.js:需要 Node.js 环境(推荐 LTS 版本)。
- 安装依赖:在
D:\software\MCP\ssh-mcp-server路径下执行:
npm install
- 构建项目:
npm run build
- 运行方式:
node build/index.js --host 192.168.179.141 --port 22 --username root --password kali
- 添加 MCP 服务器到 AI 客户端:
{
"mcpServers": {
"ssh-mcp-server": {
"command": "npx",
"args": [
"-y",
"@fangjunjie/ssh-mcp-server",
"--host", "192.168.179.141",
"--port", "22",
"--username", "root",
"--password", "kali"
]
}
}
}
三、测试
虚拟机里开 Kali,IP 为 192.168.179.141,SSH 端口 22,账号 root,密码 kali
运行命令:
node build/index.js --host 192.168.179.141 --port 22 --username root --password kali
调用 AI 进行分析,OK!