Works with the AI Agents you already use
Linux Server Hardening Audit (Read-Only)
by Saizul Amin
Read-only security auditing and hardening for Ubuntu/Debian servers.
$7
Linux Server Hardening Audit (Read-Only)
Example session with this skill installed
Run a read-only hardening audit of my Ubuntu VPS config (I copied /etc into a folder) and give me a prioritised fix list.
- Read your context and instructions
- Compiled the linux server hardening
I ran the bundled script from the server-hardening-audit skill and reviewed its findings.
Demo data: this is the real, unedited output of the skill's script on the test fixture that ships with its source repo.
Script output
Server hardening audit (read-only)
[HIGH ] Root can log in over SSH with a password (ssh.permitrootlogin)
PermitRootLogin yes
fix: echo 'PermitRootLogin no' | sudo tee -a /etc/ssh/sshd_config.d/00-hardening.conf
fix: sudo sshd -t && sudo systemctl reload ssh
[HIGH ] SSH password login is enabled (ssh.passwordauthentication)
Passwords can be brute-forced. Confirm key login works in a second session first.
fix: echo 'PasswordAuthentication no' | sudo tee -a /etc/ssh/sshd_config.d/00-hardening.conf
fix: sudo sshd -t && sudo systemctl reload ssh
[HIGH ] UFW default incoming policy is 'allow' (firewall.default)
fix: sudo ufw default deny incoming
[HIGH ] Port 3306 (MySQL/MariaDB) is open to the internet (firewall.rule)
3306/tcp ALLOW IN Anywhere
fix: sudo ufw status numbered
fix: sudo ufw delete <rule-number>
fix: sudo ufw allow from <trusted-ip> to any port 3306
[HIGH ] Account 'toor' has UID 0 (root privileges) (accounts.uid0)
fix: sudo usermod -u <new-uid> toor # or remove the account
[HIGH ] MySQL/MariaDB listens on all interfaces: tcp/3306 (mysqld) (ports.risky)
Bind it to 127.0.0.1 or a private interface. Docker-published ports bypass UFW.
fix: Set bind-address/listen to 127.0.0.1 in the service config
fix: Docker: publish as 127.0.0.1:PORT:PORT
[HIGH ] Redis listens on all interfaces: tcp/6379 (redis-server) (ports.risky)
Bind it to 127.0.0.1 or a private interface. Docker-published ports bypass UFW.
fix: Set bind-address/listen to 127.0.0.1 in the service config
fix: Docker: publish as 127.0.0.1:PORT:PORT
[MEDIUM] Keyboard-interactive auth is enabled (PAM password prompts) (ssh.kbdinteractive)
This can allow password logins even when PasswordAuthentication is no.
fix: echo 'KbdInteractiveAuthentication no' | sudo tee -a /etc/ssh/sshd_config.d/00-hardening.conf
fix: sudo sshd -t && sudo systemctl reload ssh
[MEDIUM] fail2ban is not installed or not running (fail2ban)
It bans IPs that repeatedly fail SSH logins.
fix: sudo apt install fail2ban
fix: sudo systemctl enable --now fail2ban
[MEDIUM] Unattended upgrades are disabled (updates)
APT::Periodic::Unattended-Upgrade is not "1".
fix: sudo apt install unattended-upgrades
fix: sudo dpkg-reconfigure -plow unattended-upgrades
[LOW ] X11 forwarding is enabled (ssh.x11forwarding)
Servers rarely need it.
fix: echo 'X11Forwarding no' | sudo tee -a /etc/ssh/sshd_config.d/00-hardening.conf
fix: sudo sshd -t && sudo systemctl reload ssh
[LOW ] MaxAuthTries is 6 (ssh.maxauthtries)
3 or 4 slows down guessing.
fix: echo 'MaxAuthTries 3' | sudo tee -a /etc/ssh/sshd_config.d/00-hardening.conf
fix: sudo sshd -t && sudo systemctl reload ssh
[LOW ] SSH is not rate limited (no ufw limit rule and no fail2ban) (firewall.ssh_rate_limit)
fix: sudo ufw limit OpenSSH
[LOW ] A reboot is required to finish applying updates (updates.reboot)
Kernel or libc updates are not active until reboot.
fix: cat /var/run/reboot-required.pkgs
fix: sudo reboot # in a maintenance window
[INFO ] No AllowUsers/AllowGroups restriction (ssh.allowlist)
Optional: limit SSH to named users, e.g. AllowUsers deploy.
[INFO ] 3 user(s) in sudo/admin groups: deploy, olddev, ubuntu (accounts.sudo)
Confirm each one still needs admin access. Also review /etc/sudoers.d/.
fix: sudo gpasswd -d <user> sudo # remove one that does not
[INFO ] 5 service(s) listen on public interfaces (ports.public)
tcp/22 (sshd), tcp/3306 (mysqld), tcp/6379 (redis-server), tcp/80 (nginx), udp/68 (dhclient)
Summary: 7 high, 3 medium, 4 low, 3 info. Nothing was changed.
Next steps
- Fix HIGH items first, keeping an open SSH session while changing sshd.
- Apply firewall and update settings, then re-run the audit.
- Schedule the audit monthly to catch drift.
Connects securely to your tools. The creator never sees your data.
About this skill
Leaving a new VPS at default settings is a security risk. This skill performs a read-only audit of Ubuntu and Debian servers to identify misconfigured SSH daemons, open ports, and missing firewall rules before they are exploited.
What it does
- SSH analysis runs
sshd -Tto verify password authentication, root login status, and key-based access. - Network mapping uses
ssto identify services listening on public interfaces instead of localhost. - Firewall verification checks UFW status and rules to ensure only necessary ports are exposed.
- Brute-force protection audits
fail2banandunattended-upgradesto confirm active defense and patching. - User auditing reviews sudoers and accounts with UID 0 to identify privilege escalation risks.
How it works
- Environment detection determines if the agent is running locally on the target or requires remote data collection.
- Read-only audit executes the
audit_server.pyscript to collect configuration data without modifying any system files. - Report generation produces a prioritized list of findings categorized by severity (High, Medium, Low).
- Interactive remediation presents specific fix commands for each finding, requiring explicit confirmation before any changes are applied.
Frameworks & tools
Target systems include Ubuntu 22.04/24.04 and Debian 12. The skill utilizes Python 3.8+, SSH, UFW, fail2ban, and standard Linux networking utilities.
Why this beats prompting it yourself
Manual auditing often misses how specific configs interact, such as Docker bypassing UFW rules or sshd_config.d file priority. This skill follows a non-destructive, structured sequence that ensures you don't lock yourself out of your own server while hardening it.
Use cases
- Auditing a newly provisioned VPS or droplet before production deployment.
- Investigating high volumes of brute-force noise in
auth.log. - Conducting monthly security health checks on existing infrastructure.
- Verifying that public-facing services like MySQL are properly bound to localhost.
Known limitations
Does not cover CIS/PCI compliance scoring, container-level vulnerabilities, or web application flaws like XSS. Requires sudo access for full SSH and firewall inspection.
Open source: saizul/vps-devops-skills on GitHub (MIT licence, by Saizul Amin).
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.
Requires sudo for sshd -T and firewall status. Only supports Ubuntu/Debian. Does not cover application-layer vulnerabilities or container security.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 2 days ago
Linux only
- Software
Python 3.8+