Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk12 min

How to Secure a Linux VPS and Test It for Vulnerabilities

Secure a Linux VPS in the right order: prepare recovery, patch continuously, harden SSH, restrict ports with UFW, test with authenticated and external scans, and retain evidence for repeatable verification.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A secure Linux VPS is built in a deliberate order: establish recovery access, inventory the machine, patch it, create a least-privilege administration path, reduce exposed ports, then test the result with both configuration and network-oriented checks. On Ubuntu, that means reviewing daily unattended-upgrades, hardening OpenSSH without locking yourself out, enforcing a default-deny UFW policy, and measuring the host against a release-matched CIS Benchmark or DISA STIG profile with OpenSCAP or SCC. Keep the scan reports and repeat the process after material changes.

What a secure Linux VPS must accomplish

Internet exposure turns ordinary maintenance mistakes into remotely exploitable conditions. Security is not one setting or one scan; it is a repeatable operating process that limits reachable services, limits administrative power, applies fixes quickly, and proves that the intended controls are actually active.

As an Amazon Associate I earn from qualifying purchases.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use this order because each stage protects the next one:

  1. Recovery: confirm a provider console or other out-of-band path, create a restorable snapshot or backup, and verify that restoration is possible.
  2. Inventory: record the distribution and release, public addresses, listening sockets, users, enabled services, and application ports that must be reachable.
  3. Maintenance: bring packages current, enable security-update automation where appropriate, and plan reboots for kernel or critical-library updates.
  4. Administration: use a named account with narrowly scoped sudo rights and key-based SSH where practical.
  5. Exposure control: apply a default-deny firewall and permit only required ports, ideally from restricted source networks.
  6. Assessment: run authenticated configuration and package checks, an external reachability check, and a standards-based profile evaluation.
  7. Evidence: retain the versions, rules, reports, exceptions, and recovery-test results so a later scan can demonstrate improvement.

Do not begin by disabling root SSH or enabling a firewall in a single remote session with no console access. Ubuntu documentation specifically warns that an incorrect OpenSSH change can lock out a remote administrator.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Prepare recovery and establish a baseline

Confirm a way back in

Before changing SSH or firewall policy, sign in to the VPS provider’s web console, serial console, rescue environment, or equivalent out-of-band mechanism. Test that it works while the server is healthy. Take a snapshot or backup that you can restore, and document who can initiate a restore and how long it takes. A backup that has never been restored is an assumption, not recovery evidence.

Record the current state

Save a dated baseline before hardening. At minimum, capture:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Distribution name, release, kernel version, and architecture.
  • Public IPv4 and IPv6 addresses and the provider’s private-network addresses.
  • Listening sockets and the process owning each socket.
  • Local users, groups, administrator memberships, and authorized SSH keys.
  • Enabled services and scheduled jobs.
  • Application ports that must be public, ports that should be management-only, and ports that should remain private.
  • Current firewall status and rules.
  • Recent package-update history and relevant authentication, SSH, firewall, and application logs.

On a Linux host, commands such as ss -tulpn, systemctl list-unit-files --state=enabled, and a review of the relevant journal can provide the raw inventory. Protect the resulting notes because addresses, account names, and key fingerprints are operationally sensitive.

Define the threat model before choosing exceptions

Write down whether administration comes from a fixed office range, a VPN, a bastion host, or changing residential addresses. Decide which services are intentionally public, whether IPv6 is in use, and how emergency access will work. A rule that allows SSH from one office address is excellent when that address is stable and dangerous when it is not; an emergency exception should be documented and removed when it is no longer needed.

Patch the operating system and keep it patched

Apply the supported update process

Use the package manager and repositories supported by the installed distribution. On Ubuntu or Debian, a typical maintenance window includes:

sudo apt update
sudo apt full-upgrade

Review packages that are held back, services that need restarting, and whether a reboot is required. Do not assume that a successful package command means every running process has loaded the new library or kernel.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand Ubuntu’s unattended updates

Ubuntu Server installs unattended-upgrades by default. It normally runs daily and applies security updates automatically. Confirm that the service is enabled, inspect its configuration, and review its logs rather than treating the default as proof that updates are succeeding. Check the reboot policy: some updates need a reboot, and an automatic reboot can conflict with application availability or change-control requirements.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Make the operational choice explicit:

  • Automatic installation: reduces the time a known security fix remains unapplied, but still requires monitoring, testing of critical workloads, and a deliberate reboot plan.
  • Controlled maintenance windows: provide more scheduling control, but require someone to review advisories and apply updates promptly.

Whichever model you use, retain update logs, note failed runs, and alert on a host that has stopped checking its repositories.

Remove software you do not need

Every installed daemon creates code, a configuration surface, and potentially a listening socket. Uninstall packages that are not required; otherwise disable their services and verify that they no longer listen. Re-run the socket and service inventory after cleanup. Do not delete a package merely because its name is unfamiliar: identify its dependency role first and record any exception that remains.

Build a least-privilege administration path

Create and test a named administrator

Use an individual account rather than sharing root. Grant only the sudo rights needed for maintenance, and keep separate accounts for people or automation when their duties differ. Confirm that the new account can log in, obtain the intended privilege, and read the recovery instructions before changing the existing root access path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Review membership in administrative groups and remove stale accounts, expired contractors, and unused keys. Keep authorized-key files readable only by the account and administrators who need to manage them. Store private keys in protected hardware or encrypted storage; never copy a private key onto the VPS.

Prefer SSH keys and make root/password decisions deliberately

Key-based authentication avoids sending a reusable password over an interactive login path and is the practical default for administration. Whether to disable password authentication and direct root login depends on your threat model and recovery plan. If every administrator has a tested key and console access exists, disabling both can reduce exposure. If an emergency workflow still depends on password access, replace it with a stronger, documented path before removing it.

Common OpenSSH controls include PubkeyAuthentication, PasswordAuthentication, PermitRootLogin, and AllowUsers or AllowGroups. Set them in /etc/ssh/sshd_config or a file under /etc/ssh/sshd_config.d/, according to the distribution’s include order. Avoid pasting an example without checking the effective configuration and the account names on your host.

Validate before restarting SSH

Always syntax-check the daemon configuration:

sudo sshd -t

No output and a successful exit status indicate that the file parses; they do not prove that your policy is usable. Open a second SSH session using the new account and key, verify sudo, and only then restart the service. Keep the original session open until the second path has succeeded. If the test fails, revert the last change through the open session or provider console instead of repeatedly restarting a broken configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Reduce network exposure with UFW

Start with a default-deny policy

Ubuntu identifies UFW as its default firewall configuration tool. The objective is simple: deny unsolicited inbound traffic by default and allow only the ports required by the documented workload. Outbound policy can remain distribution-default unless your threat model requires egress filtering; if you add egress restrictions, inventory every update, DNS, time, monitoring, and application dependency first.

Apply rules without cutting off your session

Use a second session and keep console access available. A representative sequence is:

sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow from 203.0.113.0/24 to any port 22 proto tcp
sudo ufw allow 443/tcp
sudo ufw enable

The address block above is documentation space, not a value to copy. Replace it with the actual approved management network. If SSH must be reachable from changing addresses, use another controlled access path rather than opening port 22 to the whole internet by habit. Permit HTTP only when the application genuinely needs it, and add any other public service only after identifying its owner and patch process.

Before closing the original session, inspect the policy:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo ufw status verbose
sudo ufw status numbered

UFW also supports dry-run output for reviewing a rule change before applying it. Delete obsolete numbered rules carefully; numbers can change after deletion, so re-check the list each time.

Account for IPv6 and provider firewalls

If the VPS has IPv6, ensure the firewall policy covers it and that an application is not reachable over IPv6 when you intended to protect only IPv4. A cloud-provider security group or edge firewall can reduce exposure before traffic reaches the guest, but it does not replace host rules: traffic from trusted networks can still reach the machine through other paths, and local services can be exposed after a provider-rule change.

Test the host for vulnerabilities

Use more than one kind of test

Assessment What it reveals What it cannot prove
Authenticated host/configuration scan Package state, permissions, service settings, SSH policy, and compliance controls visible on the machine How the host appears from an untrusted network
External network scan Reachable addresses, ports, protocols, and unexpected internet exposure Whether an apparently closed service is correctly patched internally
Standards-based profile evaluation Pass/fail results against a release-appropriate CIS Benchmark or DISA STIG profile Whether every business-specific risk is represented by the profile
Manual service and log review Context, exceptions, failed updates, authentication events, and operational symptoms A complete substitute for repeatable automated evidence

Authenticated configuration testing and external scanning are complementary. A server can pass a hardening profile while exposing an unapproved application port, or appear externally quiet while retaining weak local settings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Choose a profile that matches the release

NIST recommends using a compliance-checking tool such as SCC or OpenSCAP against the applicable DISA STIG or CIS Benchmark. Select the profile for the installed distribution and release, not merely the closest-looking operating system. CIS publishes release-specific Ubuntu benchmarks, and Red Hat-family systems commonly use profiles from the SCAP Security Guide ecosystem. Record the profile name and version with every report.

The effective SCAP version listed by NIST is SCAP 1.3. Tool support and content packages vary by distribution, so install the scanner and content from supported repositories and confirm that the content is readable before launching a production evaluation.

Run an OpenSCAP evaluation

After selecting the correct XCCDF content and profile, NIST’s example workflow is:

oscap xccdf eval --profile PROFILE_ID --results results.xml CONTENT_FILE.xml
oscap xccdf remediate --results remediation-results.xml results.xml

Replace the profile and content names with the exact files installed for your release. The evaluation produces findings; it does not automatically make the host secure. Review each failure, classify it as applicable, not applicable, or an accepted exception, and understand the service impact before remediation. If you use automated remediation, take a backup first and inspect the generated changes. Reboot or restart affected services when required, then run a fresh evaluation rather than treating the remediation file as proof of compliance.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Scan Red Hat-family systems remotely when appropriate

Red Hat documents oscap-ssh for remote OpenSCAP checks and configuration-compliance scanning. Remote execution still needs appropriate credentials, network reachability, and a profile that matches the target release. Protect the transport and retain the report alongside the host’s change record.

Check packages and vulnerabilities outside the benchmark

A benchmark evaluates configuration controls; it is not a complete vulnerability database. Review package-manager security notices, pending updates, kernel status, and vendor advisories. Investigate software that is end-of-life, locally compiled, installed outside the package manager, or pinned to an old version. Correlate a package finding with the running service and exposure before deciding whether to update, remove, isolate, or formally accept the risk.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verify that hardening changes worked

Repeat the critical checks from a clean session

  • Log in through the intended named account using its key.
  • Confirm that sudo grants the expected maintenance rights and no more.
  • Run sudo sshd -t and record the successful result.
  • Inspect the effective SSH configuration and confirm that root and password settings match the approved policy.
  • Run sudo ufw status verbose and sudo ufw status numbered; compare every rule with the port inventory.
  • From an approved external location, test the public application ports. From an unapproved network, verify that management ports are not reachable.
  • Re-run ss -tulpn and investigate any listener not present in the baseline exception list.
  • Review authentication, SSH, firewall, update, and application logs for denied connections, failed logins, and update errors.

Do not call a scan clean without reviewing its output

Export the raw report and a human-readable result. A high score can hide an unavailable test, an excluded rule, or an accepted exception. Confirm that the scanner evaluated the intended host, profile, content version, and time window. For each failed item, record the owner, risk decision, remediation, validation result, and next review date.

Keep the benchmark and support lifecycle aligned

Lifecycle choice Security implication Planning point
Ubuntu LTS standard coverage Canonical states that Main-package security support is 5 years Match the CIS benchmark and patch repositories to the exact LTS release; schedule an upgrade before standard coverage ends
Ubuntu Pro coverage Canonical states that Ubuntu Pro extends stated security coverage to 10 years and adds vulnerability patching for Universe Confirm which machines and packages are enrolled and which support scope applies to the workload

Long support does not make an old release automatically compliant. The operating-system release, benchmark version, scanner content, kernel, and application stack must be considered together. A benchmark written for one Ubuntu release can produce misleading results on another.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Record evidence and establish a repeat schedule

Keep a protected security record containing:

  • OS release, kernel, package repository configuration, and update timestamps.
  • Benchmark or STIG name, version, profile identifier, scanner version, and SCAP content version.
  • Raw evaluation reports, remediation reports, external-scan output, and the date each was collected.
  • Approved SSH settings, key inventory, administrator list, firewall rules, and documented exceptions.
  • Snapshot or backup identifiers and evidence that a restore was tested.
  • Each finding’s decision, owner, due date, and validation result.

Repeat the full workflow after major package, kernel, OpenSSH, firewall, or application changes. Also set a routine cadence for updates, log review, socket inventory, external exposure checks, and profile scans. The exact interval should reflect the server’s exposure and change rate; what matters is that it is written, assigned, and evidenced rather than left to memory.

Troubleshooting common hardening failures

SSH stopped accepting the new configuration

Keep the original session open, run sudo sshd -t, and inspect the last changed directive and include file. If the daemon will not start, use the provider console to restore the previous file or remove the invalid drop-in. Check key file ownership, permissions, account names, and whether a source restriction excludes your current network.

You enabled UFW and lost access

Use the provider console or an already-open session to run sudo ufw status numbered. Add the correct source-restricted SSH rule, verify the protocol and port, and test from a second session before terminating the first. If IPv6 was overlooked, add and test the corresponding policy rather than assuming IPv4 rules cover it.

The benchmark reports many failures

First verify the profile and release match. Then separate genuine weaknesses from rules that do not apply to the workload. Remediate in small batches, recording the service or reboot impact of each batch, and re-scan after every meaningful group of changes. Do not blindly apply every automated fix: a control that disables a required service or changes authentication behavior can create an outage without reducing the relevant risk.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Updates are installed but vulnerabilities remain

Check whether the affected process has been restarted, whether a reboot is pending, whether the package is held or sourced outside the supported repositories, and whether the finding concerns an application rather than the operating system. Review update logs and vendor advisories, then document the remaining exposure and compensating control if an immediate fix is unavailable.

A practical completion checklist

  • Recovery console works, a restorable backup exists, and a restore test is recorded.
  • OS release, addresses, sockets, users, services, and required ports are inventoried.
  • Security updates are current; Ubuntu automatic-update configuration and logs are reviewed where applicable.
  • Unneeded packages and services are removed or disabled.
  • A named administrator, protected key, and narrowly scoped sudo path are tested.
  • SSH policy is validated with sudo sshd -t before restart, and a second login path works.
  • UFW or the distribution’s equivalent denies unsolicited inbound traffic and allows only documented ports.
  • IPv4, IPv6, provider-level rules, and host-level rules agree.
  • Authenticated configuration/package checks and an external reachability check are both complete.
  • OpenSCAP or SCC evaluated a release-matched CIS Benchmark or DISA STIG profile; failures and exceptions are reviewed.
  • Reports, rule sets, remediation decisions, update history, and recovery evidence are retained.
  • A recurring schedule exists for patching, scanning, review, and re-testing after major changes.

The result is not a permanent “secure” label. It is a VPS with a tested recovery path, fewer reachable services, controlled administration, current fixes, and evidence that the controls still match the software and threat model.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.