{"id":31642447,"url":"https://github.com/tameronline/server_control","last_synced_at":"2025-10-07T03:59:33.079Z","repository":{"id":312567452,"uuid":"1047919762","full_name":"TamerOnLine/server_control","owner":"TamerOnLine","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-31T14:40:44.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-31T16:21:47.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TamerOnLine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-31T14:28:46.000Z","updated_at":"2025-08-31T14:40:48.000Z","dependencies_parsed_at":"2025-08-31T16:21:48.587Z","dependency_job_id":"6ec65ea0-8ca6-4646-abb3-ea86fa0a88c2","html_url":"https://github.com/TamerOnLine/server_control","commit_stats":null,"previous_names":["tameronline/server_control"],"tags_count":null,"template":false,"template_full_name":"TamerOnLine/pro_venv","purl":"pkg:github/TamerOnLine/server_control","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fserver_control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fserver_control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fserver_control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fserver_control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TamerOnLine","download_url":"https://codeload.github.com/TamerOnLine/server_control/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fserver_control/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278717437,"owners_count":26033542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-07T03:59:28.885Z","updated_at":"2025-10-07T03:59:33.066Z","avatar_url":"https://github.com/TamerOnLine.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# server_control\n\n`server_control` is a lightweight **server monitoring and control tool** built in Python.  \nIt lets you connect to any remote Linux server (via SSH) and launch a live monitoring dashboard powered by `tmux`.\n\n## 🔹 What it does\n\n- 📜 Stream **cloud-init logs** (`/var/log/cloud-init-output.log`)  \n- 📝 Follow **system/service logs** (e.g., `journalctl -fu peertube`)  \n- 📊 View **CPU, memory, and process usage** with `htop`  \n- 🔄 Auto-fix SSH host key issues (`fix_known_hosts.py`)  \n\nThis project starts as a monitoring tool but is designed to expand into **full server management**: service control, updates, firewall, database management, and more.\n\n---\n\n## 🚀 Features\n\n- One-command setup (`tmux` + `htop` installation if missing)\n- Multi-pane `tmux` monitoring:\n  - Top → cloud-init logs  \n  - Bottom-left → journalctl logs  \n  - Bottom-right → htop  \n- Works with any Linux server (tested on Ubuntu 22.04/24.04)  \n- Self-healing SSH connections (host key reset automation)\n\n---\n\n## ⚙️ Installation\n\nClone the repository:\n\n```bash\ngit clone https://github.com/TamerOnLine/server_control.git\ncd server_control\n```\n\n(Optional) create a virtual environment:\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate   # Linux/macOS\n.venv\\Scripts\\activate      # Windows PowerShell\n```\n\nInstall dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n---\n\n## 📡 Usage\n\n### Fix SSH host key (if IP changed):\n\n```bash\npython -m fix_known_hosts --host \u003cIP\u003e --user root\n```\n\n### Start monitoring session:\n\n```bash\npython monitor.py --host \u003cIP\u003e --user root --install\n```\n\n**Arguments:**\n- `--host` → server IP or domain  \n- `--user` → SSH username (default: root)  \n- `--install` → auto-install `tmux` + `htop` on the server  \n\n**Example:**\n```bash\npython monitor.py --host 159.69.122.193 --user root --install\n```\n\n---\n\n## 🛠 Roadmap\n\n- [x] Basic monitoring with tmux  \n- [x] SSH host key auto-fix  \n- [ ] Service management (start/stop/restart)  \n- [ ] Firewall management (ufw/iptables)  \n- [ ] Database management (Postgres/MySQL)  \n- [ ] File transfer integration (scp/rsync)  \n- [ ] Web UI dashboard (Flask/FastAPI + React/Vue)  \n- [ ] Multi-server monitoring  \n\n---\n\n## 📄 License\n\n[MIT](LICENSE) © 2025 [TamerOnLine](https://github.com/TamerOnLine)  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftameronline%2Fserver_control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftameronline%2Fserver_control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftameronline%2Fserver_control/lists"}