SERVER SECURITY GUIDE

Ransomware Protection for a Small VPS: Entry Points, Blast Radius and Recovery

Ransomware encrypts or locks your data and demands payment to give it back. On a small VPS the realistic ways in are the same unglamorous ones behind most server breaches: an exposed service, a weak or stolen credential, or an unpatched flaw. According to coverage of Verizon's 2026 Data Breach Investigations Report, ransomware was involved in 48% of the breaches analysed, up from 44% a year earlier, and 69% of ransomware victims did not pay. The 2025 edition, as reported by Infosecurity Magazine, found extortion malware in 88% of small and mid-sized business breaches against 39% at larger organisations. This guide is about breaking the chain early, keeping the damage contained, and making sure that if something is encrypted you can restore from a copy the attacker could not reach.

Quick win (10 minutes)

  • List what is listening: sudo ss -tulpn. Anything bound to 0.0.0.0 that you did not choose on purpose is a candidate entry point.
  • Confirm a recent backup exists on a different system, and that the VPS itself holds no credentials that could delete it.
  • Check SSH: grep -E "^(PasswordAuthentication|PermitRootLogin)" /etc/ssh/sshd_config should show no for both.
  • Confirm unattended-upgrades (or your distribution's equivalent) is actually enabled.
  • Check for stray root-equivalent accounts: sudo awk -F: '$3==0 {print $1}' /etc/passwd should print only root.

How ransomware reaches a VPS

CISA's #StopRansomware Guide organises prevention under six headings: internet-facing vulnerabilities and misconfigurations, compromised credentials, phishing, precursor malware infection, advanced social engineering, and third parties and managed service providers. For a VPS run by one or two people, the first two do most of the damage. In the guide's own words, "threat actors often gain initial access to a network through exposed and poorly secured remote services."

The same pattern shows up in the data. Verizon's 2026 report, again as covered by Help Net Security, found that exploitation of vulnerabilities accounted for 31% of breaches and had overtaken stolen credentials as the most common initial access vector. Sophos's State of Ransomware 2026 page puts the share of attacks that succeeded in encrypting data at 56%. In other words, the attacker usually does not need anything clever: a reachable service, a password or key that works, or a published flaw you have not patched yet.

Close the entry points first

Work through the three doors in order of how often they are used.

If you only have an hour, spend it here. Everything after this section limits the damage from an intrusion; this section is what prevents the intrusion.

Limit the blast radius

Assume one day something gets in, and decide now how much it can reach. The principle is least privilege: each account and process gets only what it needs. In practice that means the web application runs as its own unprivileged user, so a compromised app cannot rewrite system files or another application's data. Admin work happens through named accounts with scoped sudo rights (see users, sudo and least privilege), not through a shared root login.

The most important separation is between production and backups. CISA warns that "many ransomware variants attempt to find and subsequently delete or encrypt accessible backups to make restoration impossible unless the ransom is paid." A server that can reach its own backups with delete rights hands that capability to whoever takes it over. Give the backup job credentials that can add data but not remove it, or have a separate backup system pull data from the VPS instead of the VPS pushing to it.

Want to know which of these doors are open on your server?

A free, read-only server check lists exposed services, SSH settings and patch status without changing anything.

Get your free server check Talk to a security engineer

Backups that survive an attacker

CISA's recommendation is direct: "maintain offline, encrypted backups of critical data" and "regularly test the availability and integrity of backups in a disaster recovery scenario." It also advises enabling "delete protection or object lock on storage resources often targeted in ransomware attacks." Our VPS backup strategy guide turns that into a working setup: the 3-2-1 rule, immutable copies, pull-based backups and restore tests.

Keep several generations, not just the latest. The CISA guide cautions that "care must be taken to identify such dropper malware before rebuilding from backups to prevent continuing compromises." If the intrusion began three weeks ago, last night's backup may already contain the attacker's foothold, and you need an older clean copy to fall back on.

Detect it early

Ransomware is rarely the first thing an attacker does. There is usually a period of reconnaissance and persistence first, and that is where you can catch it. Watch for new accounts, new cron or systemd entries, unexpected outbound connections, unexplained CPU or disk activity, and failed or missing backup jobs. The server monitoring guide lists what to track, and file integrity monitoring will flag changes to files that should never change.

A cheap extra signal is a few canary files in directories that nothing legitimate touches. If they are suddenly modified or renamed, something is rewriting files in bulk and you want to know in minutes, not at the next login. Alert on backup failures too: an attacker who deletes or breaks backups before encrypting often shows up first as a backup job that silently stopped.

The first hour if you are hit

Isolate first, preserve evidence second, restore third. Cut the host off from the network through the provider's firewall or console so it cannot spread or keep exfiltrating, but do not wipe it yet. This is the containment step from the breach response guide, which covers detection through recovery in full.

Then identify which backups predate the intrusion, rotate every credential that lived on the host (SSH keys, database passwords, API tokens, cloud keys), and rebuild from a known-clean image rather than cleaning in place. Remember that backups restore availability but do not undo theft: if sensitive data was on the server, treat it as potentially disclosed and check what notification duties apply to you. Whether to pay is a business and legal decision, not a technical one, and 69% of victims in Verizon's 2026 data did not.

Frequently asked questions

Does ransomware affect Linux VPS servers?

Yes. Ransomware is not specific to Windows: any server an attacker can reach and gain write access on can have its data encrypted. CISA's guidance centres on exposed services, stolen credentials, phishing and unpatched flaws, none of which are tied to one operating system.

What is the most common way ransomware gets onto a small server?

Through an exposed or poorly secured remote service, a compromised credential, or an unpatched vulnerability. CISA names internet-facing vulnerabilities and compromised credentials as leading prevention areas, and Verizon's 2026 report put vulnerability exploitation at 31% of breaches.

Will backups alone protect me from ransomware?

Backups let you restore availability, but only if the attacker could not delete or encrypt them. They also do not undo data theft. Use offline or immutable copies, keep several generations, test restores, and combine them with the prevention steps in this guide.

Should I pay the ransom?

Paying does not guarantee you get working data back, and 69% of ransomware victims in Verizon's 2026 report did not pay. Treat it as a business and legal decision made with counsel and, if you have one, your insurer, after you have checked what your backups can restore.

How do I know if my server has been hit by ransomware?

Typical signs are files that suddenly cannot be opened or have new extensions, ransom note files in directories, unexplained spikes in disk and CPU use, services failing because their data is unreadable, and backup jobs that stopped or failed. Earlier warning signs are new accounts, new scheduled tasks and unexpected outbound connections.

Can a small business realistically defend against ransomware?

Yes, because the entry points are mostly ordinary ones. Closing exposed services, using key-only SSH with a second factor, patching quickly and keeping immutable backups removes the easy routes and limits the damage if something still gets through.

Not sure where your server stands?

Get a free, read-only security check, or talk to a security engineer about managed protection.

Get your free server check Talk to a security engineer