Ubuntu: Securing SSH (Root & Keys)

1. Disable Root Login

Edit config: nano /etc/ssh/sshd_config

Find PermitRootLogin and set to no.

2. Use SSH Keys

Paste your public key into ~/.ssh/authorized_keys.

3. Restart SSH

systemctl restart ssh
  • 0 کاربر این را مفید یافتند
آیا این پاسخ به شما کمک کرد؟

مقالات مربوطه

Ubuntu: First Login & Updates

Welcome to Ubuntu!After logging in as root, your first task is to update the system repositories...

Ubuntu: Setting up UFW Firewall

Ubuntu uses UFW (Uncomplicated Firewall).Allow SSH first: ufw allow ssh (or allow 22/tcp).Allow...

Ubuntu: Installing Fail2Ban

Protect SSH from brute force attacks.apt install fail2ban -yStart the service:systemctl start...