> For the complete documentation index, see [llms.txt](https://docs.up-network.ch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.up-network.ch/documentation/en/guides/how-to-secure-your-vps.md).

# Secure your VPS

On a VPS or Unmanaged VDS, you administer the operating system, software and application security. The infrastructure’s DDoS protection and anti-spoofing complement these measures.

## Start with access

Use unique passwords and an SSH key for Linux connections. A public key can be sent to the server; the private key must remain on your device.

Create a named user with the necessary permissions. Verify their access and administrator permissions in a second session before restricting the old access. Keep a recovery console available.

If you change the SSH configuration, check its syntax:

```sh
sudo sshd -t
```

Then reload the service according to your distribution’s procedure and test a new connection. Disable password authentication only after verifying key-based access.

## Reduce exposed services

You can check listening ports on Linux:

```sh
sudo ss -tulpen
```

Open only the necessary services in the firewall, taking both IPv4 and IPv6 into account. Preserve your actual SSH access before enabling a restrictive policy. Keep databases, administration interfaces and internal services out of public exposure where possible.

## Maintain and recover

Install security updates for the operating system and applications. Prepare for necessary restarts and monitor logs and failed login attempts.

Configure a [backup](/documentation/en/guides/backups-and-restoration.md) suited to your files and databases, then test recovery. A snapshot taken before an update makes rollback easier but does not replace an independent backup.

In the event of a compromise, isolate the affected services, preserve useful evidence and revoke the access concerned. Contact [support](/documentation/en/guides/how-to-open-a-support-ticket.md) with the service and impact.

Updated on 3 October 2026. References: [VPS](https://up-network.ch/services/vps-hosting), [SSH access administration](https://www.ispsystem.com/docs/v6/additional-systems/ssh-protocol).
