SSH Server MCP

by giuliolibrando

Not rated
GitHub

About

An MCP server that provides SSH-based remote management tools, acting as proxy

Details

Author
giuliolibrando
Categories
Developer Tools, Other, Infrastructure, Cloud Service

Setup

Install SSH Server MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/giuliolibrando/ssh-mcp-server

Follow the installation instructions in the repository README, then restart your MCP client.

A Model Context Protocol (MCP) server for managing Linux servers via SSH. This server provides tools for executing commands, managing files, monitoring services, and analyzing logs on remote Linux systems.
- Copy the environment file and configure your SSH credentials:

cp env.example .env # Edit .env with your SSH server details
export SSH_HOST=your-server.example.com export SSH_USER=root export SSH_PASSWORD=your_password # OR export SSH_KEY_FILE=/path/to/private/key

Add the following configuration to youranythingllm_mcp_servers.json:

{ "mcpServers": { "ssh-mcp-server": { "name": "SSH MCP Server", "type": "streamable", "url": "http://ssh-mcp-server:8000/mcp", "auth_token": null, "enabled": true } } }

The server supports two authentication methods:
- Password Authentication: SetSSH_PASSWORDin your environment
- Key-based Authentication: SetSSH_KEY_FILEto the path of your private key

# Test SSH connection test_ssh_connection( hostname="server.example.com", username="root", password="your_password" )
# Execute a simple command execute_command("ls -la /var/log") # Execute with sudo execute_command("systemctl status nginx", use_sudo=True)
# Read a file read_file("/etc/nginx/nginx.conf") # Write to a file write_file("/tmp/test.txt", "Hello World!") # List directory contents list_directory("/var/log")
# Check service status get_service_status("nginx") # Start a service start_service("nginx") # Stop a service stop_service("nginx") # Restart a service restart_service("nginx")
# List all processes list_processes() # List specific processes list_processes(filter_by="nginx") # Kill a process kill_process("12345", signal="TERM")
# Check if port is open check_port(80) # Get network connections get_network_connections()
# Tail a log file tail_log("/var/log/nginx/access.log", lines=100) # Search in logs search_log("/var/log/nginx/error.log", "error")

- Use SSH key-based authentication when possible
- Limit SSH access to specific users and IPs
- Regularly rotate SSH keys and passwords
- Monitor SSH access logs
- Use sudo judiciously and limit sudo privileges
- Authentication Failed: Check username, password, or key file
- Connection Refused: Verify SSH service is running and port is correct
- Host Key Verification: Ensure the server's host key is trusted
- File Access Denied: Check file permissions and ownership
- Sudo Required: Useuse_sudo=Truefor privileged operations
- Service Management: Ensure user has appropriate systemd permissions
- Slow Commands: Increase timeout values for long-running commands
- Connection Timeouts: Check network connectivity and server load
- Resource Usage: Monitor server resources during operations

The server exposes the following MCP tools:

- test_ssh_connection: Test SSH connectivity
- get_server_info: Get system information
- execute_command: Execute commands
- read_file: Read file contents
- write_file: Write file contents
- list_directory: List directory contents
- get_service_status: Check service status
- start_service: Start a service
- stop_service: Stop a service
- restart_service: Restart a service
- list_processes: List running processes
- kill_process: Kill a process
- check_port: Check port status
- get_network_connections: Get network connections
- tail_log: Tail log files
- search_log: Search log files

This project is licensed under the MIT License.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

A high-performance MCP server for the headless terminal (ht), implemented in Rust.

DevOps MCP — Secure MCP Server for Linux Server Automation

A three-tier access control MCP server that allows AI assistants (Claude Code, Cursor, Windsurf) to safely scan, plan, and operate Linux servers via SSH without full write access. Includes an out-of-band human consent token gate, automated port-conflict scanning, and a completely read-only default safe mode to eliminate accidental destructive commands on production environments.

The official Impreza Host connector for offshore server management

A local MCP server that securely connects to remote servers over SSH, acting as a proxy for MCP commands.

MCP (Model Context Protocol) server for managing VPS servers via the mikr.us API and remote Linux servers over SSH. Built in Python, runs anywhere — locally, in Docker, or as a Claude Desktop integration.

HashiCorp Terraform MCP server for Infrastructure as Code workflows, including provider and module discovery through the Terraform Registry.

An example of a remote MCP server deployed on Cloudflare Workers without authentication.

A remote MCP server without authentication, designed for easy deployment on Cloudflare Workers.

An example of a remote MCP server without authentication, deployable on Cloudflare Workers or runnable locally.

A remote MCP server without authentication, deployable on Cloudflare Workers or locally with npm.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.