First Server Access
Just activated your server? Here are the first operations to secure and properly configure system.
1. Update System
First thing to do is update all packages to latest available version.
Debian / Ubuntu:
apt update && apt upgrade -y
CentOS / AlmaLinux / Rocky Linux:
dnf update -y
2. Change Root Password
Don't use email password long-term. Change it immediately:
passwd
Full guide: Change Root Password
3. Set Correct Timezone
timedatectl set-timezone Europe/Rome
Verify with:
timedatectl
4. Set Hostname
hostnamectl set-hostname server-name
5. Create Non-Root User (recommended)
Working always as root is risky. Create dedicated user:
adduser deploy
usermod -aG sudo deploy # on Debian/Ubuntu
Then add user to wheel group on CentOS/AlmaLinux:
usermod -aG wheel deploy
6. Configure SSH Keys
Access with SSH keys is much more secure than passwords. Guide: SSH Keys
7. Configure Basic Firewall
Open only SSH port and those you need:
# UFW (Debian/Ubuntu)
ufw allow 22/tcp
ufw enable
ufw status
Full guide: Firewall
Quick Checklist
| Operation | Command |
|---|---|
| Update system | apt update && apt upgrade -y |
| Change root password | passwd |
| Set timezone | timedatectl set-timezone Europe/Rome |
| Set hostname | hostnamectl set-hostname name |
| Enable firewall | ufw enable |
Articoli correlati
Change Root Password
How to change your server's root password and how to recover it if forgotten
SSH Keys
How to generate and configure SSH keys for secure password-less access
SSH Access with PuTTY and FileZilla
How to connect to VPS via SSH with PuTTY and manage files with FileZilla on Windows
