Skill站外收录 @skilllib/skill-2117939930272417288
vps-checkup
对 Ubuntu Docker VPS 执行只读式健康与安全检查,涵盖系统状态、防火墙 UFW、入侵防护 fail2ban、端口监听、软件更新可用性及 Docker 运行状况,生成结构化报告并提出需用户确认后才执行的修复建议。
效率工具 AI 技能
Skills.MD
# VPS checkup (Ubuntu + Docker)
## Goal
- Produce a clear, read-only health/security/update report for an Ubuntu VPS running Docker.
- Propose safe, minimal fixes; do not apply changes or restart anything unless the user explicitly confirms.
## Inputs to ask for (if missing)
- SSH target host alias (from `~/.ssh/config` on Windows: `$HOME\\.ssh\\config`) or `user@ip`.
- Confirm `sudo` access and whether running `apt update` is allowed (it modifies package lists).
- Required open ports (e.g., `22`, `80`, `443`) and any non-standard SSH port.
- Where deployments live: confirm if Docker Compose is used on the VPS (common), and whether compose files are in a known path.
- If the local `ssh` client or required tools are missing, tell the user and ask whether to install them or provide command output manually.
## Workflow (checklist)
1) Connect safely
- Keep a second SSH session open before any SSH/firewall changes.
- Record identity/time/host: `whoami`, `hostname -f`, `date -Is`, `uptime`.
2) Collect a read-only baseline (system)
- OS/kernel: `lsb_release -a` (or `cat /etc/os-release`), `uname -a`.
- CPU/mem/disk: `top` snapshot, `free -h`, `df -hT`, `lsblk`.
- Services: `systemctl --failed`, `journalctl -p 3 -xb --no-pager` (use `sudo` if needed).
3) Check security posture (read-only)
- SSH: prefer `sudo sshd -T` (fallback to `sudo cat /etc/ssh/sshd_config` + `sshd_config.d/`).
- Firewall: `sudo ufw status verbose` (and `sudo ufw status numbered`).
- Fail2ban: `sudo fail2ban-client status` (+ `status sshd` if present).
- Listening ports: `ss -tulpn` (use `sudo` if needed).
4) Check update posture (read-only by default)
- If user allows: run `sudo apt update` to ensure accurate results.
- Then collect: `apt list --upgradable`, `ubuntu-security-status` (if available), and `/var/run/reboot-required` presence.
- Check unattended upgrades: `systemctl status unattended-upgrades --no-pager` and `/var/log/unattended-upgrades/`.
5) Check Docker health (read-only)
- Daemon status: `systemctl status docker --no-pager`, `docker info`.
- Containers: `docker ps`, unhealthy/restarting containers, recent restarts, and `docker stats --no-stream`.
- Disk usage: `docker system df` and large log growth indicators.
- Compose overview: `docker compose ls` (then inspect key projects as needed).
6) Produce the report + recommendations
- Use `references/report-template.md`.
- Use `references/ubuntu-docker-checkup-commands.md` for a copy/paste command set.
- Rank findings by severity and explicitly list what requires confirmation (updates, firewall changes, SSH changes, restarts, pruning, reboot).
7) Apply fixes (ONLY with explicit confirmation)
- Do not run `apt upgrade`, change UFW rules, change SSH auth, prune Docker, restart services/containers, or reboot unless the user says to.
## Safety gates (non-negotiable)
- No restarts (Docker/system services) unless the user explicitly asks for restart.
- No SSH/firewall changes unless you have a backup access path (second session open) and the user confirms the plan.
- Never paste secrets (tokens, private keys) into chat or logs.
## Deliverable
Provide:
- A read-only report using `references/report-template.md`.
- A prioritized list of recommended fixes and which ones require explicit confirmation.
- The exact commands run (or requested if the user ran them manually).
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「vps-checkup」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次