Enables remote control and management of Linux VMs via SSH, allowing execution of commands, system monitoring, and administration tasks with automatic safety checks for destructive operations.
MCP Server - SSH Linux Control for OpenWebUI
Control your Linux VMs via SSH directly from OpenWebUI with automatic safety checks for destructive commands.
Quick Setup
1. Configure Your VMs
Copy the example config and edit it:
Add your VMs:
2. Start the Server
3. Connect to OpenWebUI Network
4. Add Tool to OpenWebUI
Open OpenWebUI ā Workspace ā Tools
Click + Create Tool
Copy and paste entire contents of
ssh_linux_control.pySave
Done! š
Usage Examples
Ask OpenWebUI:
"List my VMs"
"Connect to vm1 and check disk space"
"Show memory usage on vm1"
"Run 'systemctl status nginx' on my server"
Features
ā
Password-based SSH authentication (no keys needed)
ā
Automatic destructive command detection
ā
Sudo support (uses password from config)
ā
40+ destructive command patterns detected
ā
Real-time command output
Destructive Command Safety
Commands like rm -rf, shutdown, systemctl stop, etc. require explicit confirmation:
First attempt: Shows warning
Retry with
confirmed=Trueto execute
Troubleshooting
Tool can't connect to server:
If OpenWebUI is containerized, ensure both containers are on the same network:
File Structure
config.yaml.example- Example configuration (safe to commit)config.yaml- Your VM credentials (gitignored, DO NOT COMMIT)ssh_linux_control.py- OpenWebUI tool filedocker-compose.yml- Container configurationsrc/ssh_control_mcp/- MCP server & HTTP wrapper
Security Notes
ā ļø NEVER commit - it contains plain-text passwords
ā ļø Use config.yaml.example as a template
ā ļø Designed for local VM management on trusted networks only
License
MIT License - See LICENSE file for details