SSH MCP Server
Enables SSH connectivity and remote command execution on Raspberry Pi devices, allowing testing of connections and running commands with stdout, stderr, and exit code responses.
Enables SSH connectivity and remote command execution on Ubuntu servers, allowing testing of connections and running commands with stdout, stderr, and exit code responses.
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 MCP Servertest connection to my raspberry pi"
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 Server
A Model Context Protocol (MCP) server that enables SSH connectivity and remote command execution. This server can run locally to access private networks or via Smithery for public servers.
Features
ssh_test_connection: Tests connectivity to the configured host and returns hostname
ssh_run: Executes commands remotely and returns stdout, stderr, and exit code
Related MCP server: SSH MCP Server
Installation Methods
Method 1: From Source (For Development)
Best for developers who want to modify the code or contribute to the project.
Clone and build:
git clone https://github.com/lgariv/ssh-mcp
cd ssh-mcp
npm install
npm run buildAdd to your MCP client config:
{
"mcpServers": {
"ssh-mcp": {
"command": "node",
"args": ["path/to/ssh-mcp/dist/index.js"],
"env": {
"SSH_HOST": "192.168.1.100",
"SSH_PORT": "22",
"SSH_USERNAME": "ubuntu",
"SSH_PASSWORD": "your-password"
}
}
}
}Method 2: Via NPM Package (Recommended for Local Networks)
Best for accessing servers on your local network (LAN) or private IPs. Runs on your machine.
Add to your MCP client config:
{
"mcpServers": {
"ssh-mcp": {
"command": "npx",
"args": ["-y", "@lgariv/ssh-mcp@latest"],
"env": {
"SSH_HOST": "10.0.0.116",
"SSH_PORT": "22",
"SSH_USERNAME": "admin",
"SSH_PASSWORD": "your-password"
}
}
}
}Benefits:
No installation required
Always uses the latest version
Can access local network resources (192.168.x.x, 10.x.x.x, etc.)
Credentials stay on your machine
Method 3: Via Smithery (For Public Servers Only)
Best for accessing publicly accessible SSH servers. Runs on Smithery's infrastructure.
⚠️ Important: This method only works with publicly accessible servers. It cannot access private IPs or LAN resources.
Add to your MCP client config:
{
"mcpServers": {
"ssh-mcp": {
"type": "http",
"url": "https://server.smithery.ai/lgariv/ssh-mcp/mcp",
"config": {
"sshHost": "public.example.com",
"sshPort": 22,
"sshUsername": "ubuntu",
"sshPassword": "your-password"
}
}
}
}Configuration
All methods require these environment variables or config parameters:
Parameter | Description | Default |
| Target SSH server IP/hostname | Required |
| SSH port number | 22 |
| SSH username | Required |
| SSH password | Required |
Use Cases by Method
Use Case | Recommended Method |
Local home lab servers | Method 2 (NPM) |
Raspberry Pi on LAN | Method 2 (NPM) |
Local VMs or containers | Method 2 (NPM) |
Development and testing | Method 1 (Source) |
Cloud VPS with public IP | Method 3 (Smithery) |
Public web servers | Method 3 (Smithery) |
Security Notes
Methods 1 & 2: Credentials are stored locally in your MCP configuration
Method 3: Credentials are sent to Smithery's servers (use only with public servers)
Always use strong passwords and consider SSH keys for production use
Ensure your MCP configuration file has appropriate permissions
Development
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build for production
npm run build
# Run built version
npm startLicense
ISC
Author
lgariv
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
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.Last updated18
- 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.Last updated7MIT
- AlicenseAqualityDmaintenanceEnables remote server management through SSH and SFTP, supporting command execution, file transfers, and interactive shell sessions. It allows for multiple concurrent connections using either password or SSH key authentication.Last updated11312MIT
- AlicenseBqualityDmaintenanceEnables secure SSH connections to remote servers for executing shell commands and managing active sessions. It supports authentication via passwords or private keys and provides optional host-based access control.Last updated4102MIT
Related MCP Connectors
Operate your own Linux servers from your LLM. Requires the SentinelX agent installed per host.
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Interact with a global network measurement platform.Run network commands from any point in the world
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/lgariv/ssh-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server