server_control is a lightweight server monitoring and control tool built in Python.
It lets you connect to any remote Linux server (via SSH) and launch a live monitoring dashboard powered by tmux.
- 📜 Stream cloud-init logs (
/var/log/cloud-init-output.log) - 📝 Follow system/service logs (e.g.,
journalctl -fu peertube) - 📊 View CPU, memory, and process usage with
htop - 🔄 Auto-fix SSH host key issues (
fix_known_hosts.py)
This project starts as a monitoring tool but is designed to expand into full server management: service control, updates, firewall, database management, and more.
- One-command setup (
tmux+htopinstallation if missing) - Multi-pane
tmuxmonitoring:- Top → cloud-init logs
- Bottom-left → journalctl logs
- Bottom-right → htop
- Works with any Linux server (tested on Ubuntu 22.04/24.04)
- Self-healing SSH connections (host key reset automation)
Clone the repository:
git clone https://github.com/TamerOnLine/server_control.git
cd server_control(Optional) create a virtual environment:
python -m venv .venv
source .venv/bin/activate # Linux/macOS
.venv\Scripts\activate # Windows PowerShellInstall dependencies:
pip install -r requirements.txtpython -m fix_known_hosts --host <IP> --user rootpython monitor.py --host <IP> --user root --installArguments:
--host→ server IP or domain--user→ SSH username (default: root)--install→ auto-installtmux+htopon the server
Example:
python monitor.py --host 159.69.122.193 --user root --install- Basic monitoring with tmux
- SSH host key auto-fix
- Service management (start/stop/restart)
- Firewall management (ufw/iptables)
- Database management (Postgres/MySQL)
- File transfer integration (scp/rsync)
- Web UI dashboard (Flask/FastAPI + React/Vue)
- Multi-server monitoring
MIT © 2025 TamerOnLine