SSH is the main way to manage a Linux VPS, so it should be secured before the server is used for public services. Start by adding an SSH key and a sudo user, then reduce password-based access where possible.

  1. Add an SSH key: How to add an SSH key to your VPS.
  2. Create a sudo user: How to create a sudo user on a Linux VPS.
  3. Test that the sudo user can log in with the SSH key.
  4. Edit the SSH config:
sudo nano /etc/ssh/sshd_config

Common hardening options are:

PermitRootLogin no
PasswordAuthentication no

Restart SSH after saving:

sudo systemctl restart ssh

Keep your current SSH session open while testing a new login. If the new login fails, you can still fix the config from the existing session or VPS console.

  • 0 משתמשים שמצאו מאמר זה מועיל
?האם התשובה שקיבלתם הייתה מועילה

מאמרים קשורים

How to connect to a Linux VPS with SSH

SSH is the normal way to manage a Linux VPS. It gives you a terminal on the server so you can...

How to update packages on a Linux VPS

Keeping packages updated helps patch security issues and keeps server tools compatible. Run...

How to create a sudo user on a Linux VPS

A sudo user lets you manage a Linux VPS without logging in as root for every task. This is safer...

How to check disk usage on a Linux VPS

Disk usage issues can stop updates, backups, logs, databases, and game saves from writing...

How to check CPU and RAM usage on a Linux VPS

High CPU or RAM usage can cause lag, slow command responses, failed updates, or game servers...