Harden a fresh server without locking yourself out.
SSH keys, a firewall and automatic updates in one run. If an SSH or firewall change locks you out, it rolls back on its own.
curl -fsSL https://github.com/bhimrazy/vps-ready/releases/latest/download/install.sh | sudo sh Linux x86_64 and arm64 · View the script first
A new server is open to the internet from minute one.
Rent a VPS and it usually comes with root login on, passwords allowed and no firewall. Bots find it fast. Locking it down by hand takes an afternoon of guides, and one wrong SSH setting can lock you out for good.
failed logins in this simulation, the kind a fresh server sees all day
Simulated SSH log of a typical fresh server. Addresses are documentation examples.
From wide open to locked down, in one run.
Switch views to see what vps-ready does to a typical fresh server. You see the exact plan before anything changes.
Look first. Change second. Undo anytime.
Five commands, run on the server itself. Nothing changes until you approve the plan, and SSH and firewall changes only stay once you prove you can still log in.
Audit
vps-ready auditChecks 29 controls and reports pass, fail, unknown or skipped. Changes nothing.
Plan
vps-ready planPrints the exact diff of every file and setting it would touch, and which parts are reversible.
Apply
vps-ready applyApplies everything in a journaled transaction and verifies each change. SSH and firewall changes arm the safety timer first.
Confirm
vps-ready confirmRun from a new SSH login. It proves you can still get in and cancels the safety timer.
Roll back
vps-ready rollbackRestores files, settings, users and services from the journal. Runs on its own if no one confirms in time.
If a change locks you out, it rolls back on its own.
Before changing SSH or the firewall, vps-ready starts a safety timer (5 minutes by default).
Log in again from a new terminal and run vps-ready confirm to keep the changes. If you can't get back in, everything
rolls back, even if the server reboots.
- applySafety timer armed first
- Safety timer running5:00
You log in again
- New SSH login runs vps-ready confirm
- Safety timer canceledThe changes stay.
You're locked out
- No confirm in time
- Everything rolled backEven after a reboot.
Guides tell you what to type. vps-ready makes it safe to type it.
A guide is fine until one wrong SSH line locks you out. vps-ready checks before it changes anything, and rolls back on its own if you lose access.
| Feature | Copy-paste guide | Config tools (Ansible and similar) | vps-ready |
|---|---|---|---|
| Checks you won't lock yourself out | no | you write the checks | yes, before SSH and firewall changes |
| Undoes itself if you lose access | no | no | yes, even after a reboot |
| Shows the exact changes first | no | yes, in check mode | yes, as a diff |
| One-command undo later | no | no | yes, from a journal |
| Setup needed | an afternoon of reading | a control machine and playbooks | one binary on the server |
Six modules, always run in a safe order.
The admin user exists before SSH is locked down, and SSH ports are open before the firewall closes everything else. Together the modules cover 29 audited controls.
user.admin
Creates a non-root admin user with sudo and installs your SSH keys. Refuses system accounts.
ssh.server
Turns off root and password login, after checking the live SSH server config won't lock you out.
firewall.inbound
Blocks inbound traffic by default, in its own nftables table, and always allows SSH. Stays out of the way of ufw and firewalld.
ssh.bruteforce
Installs fail2ban to ban addresses that keep failing to log in over SSH.
kernel.sysctl
Hides kernel pointers, restricts ptrace and BPF, and tightens network defaults.
updates.auto
Turns on unattended security updates so patches land without you.
Profiles. minimal sets up the admin user, SSH, the firewall, kernel settings and automatic updates. web adds ssh.bruteforce (fail2ban). You can also switch modules on one by one.
Systems. Runs on Linux x86_64 and arm64. Tested nightly in x86_64 VMs on Ubuntu 22.04 and 24.04 and Debian 12 and 13.
Tested where lockouts actually happen.
Unit tests can't prove you can still get in after a reboot. So the risky paths run against real systems.
- UnitEvery module planned and verified against a fake filesystem.every change
- ContainersApply and rollback for updates.auto and ssh.bruteforce; apply, confirm and rollback for user.admin.every change
- Real VMsx86_64 VMs on QEMU/KVM: a real SSH server, real reboots and real second SSH logins.nightly
Built in small, safe releases.
Each release is tagged and signed. The guided setup ships in v0.4.0.
Guided setup (v0.4.0)
Run sudo vps-ready on its own: it suggests a profile, asks a few plain questions, then applies the plan behind the same safety timer. vps-ready modules explains each module.
Is it safe on a server that is already running things?
It audits first and shows the full plan. Nothing changes until you approve it. Every change is journaled, and sudo vps-ready rollback --last restores the previous state.
Which systems does it support?
Linux on x86_64 and arm64. It is tested nightly in x86_64 VMs on Ubuntu 22.04 and 24.04 and Debian 12 and 13. More distros are on the roadmap.
Will it fight with ufw, firewalld or Docker?
The firewall module stays out of the way when ufw or firewalld is in use. The audit checks whether container ports bypass the firewall.
Do I need root?
For changes, yes: apply, confirm, rollback and history need root, so run them with sudo on the server itself. detect and plan work without it, and so does audit, but some of its checks need root and show as unknown without it. There is no agent and no control machine.
What if I lose access after confirming?
Run sudo vps-ready rollback --last from any working session, or from your provider's console.
Audit first. It changes nothing.
Install it, run sudo vps-ready audit, and read the result. Then decide.
curl -fsSL https://github.com/bhimrazy/vps-ready/releases/latest/download/install.sh | sudo sh curl -fsSLO https://github.com/bhimrazy/ less install.shsudo sh install.shvps-ready/ releases/ latest/ download/ install.sh
cargo install vps-ready --locked