Panier 0 Panier
🌐
Langue & Devise
Language & Currency
Langue & Devise
← Retour à la base de connaissance
Article

Create a sudo user and disable root login

Working as root all the time is risky: create a sudo user then lock root. Create the user adduser myuser usermod -aG sudo myuser Reconnect with that account before continuing: ssh myuser@YOUR_IP Disable root password login Edit the SSH…

🛡️ Anti-DDoS gaming ⚡ NVMe 🇨🇦 100 % canadien ↩️ Garantie 7 jours 🖥️ Pterodactyl ⚙️ AMD Ryzen 7 9800X3D
📚 Base de connaissance

Working as root all the time is risky: create a sudo user then lock root.

Create the user

adduser myuser
usermod -aG sudo myuser

Reconnect with that account before continuing:

ssh myuser@YOUR_IP

Disable root password login

Edit the SSH config:

sudo nano /etc/ssh/sshd_config

Set:

PermitRootLogin no
PasswordAuthentication no   # only if your SSH keys work!

Then reload:

sudo systemctl reload ssh
Before closing your root session: test logging in with the new user in a second terminal — otherwise you risk locking yourself out.

Tu n'as pas trouvé ta réponse ?

Notre équipe canadienne répond en moins d'une heure, 7j/7.

Cet article t'a été utile ?

Powered by WHMCompleteSolution

Serveurs en ligne

Lancez votre serveur
en 60 secondes.

Forfaits dès 6,99 $CA · Protection Anti-DDoS · 100 % Canadien

NordikServer — Game Panel
$ server start
✔ Online in 2.4s — ready
[INFO] Panel ready · Resources allocated
[DDoS] Anti-DDoS shield: ACTIVE
Anti-DDoS Gaming
Garantie 7 jours
En ligne en 60s
🇨🇦 Hébergeur Canadien
99.99% Uptime
Chargement