Cara Konfigurasi SSH Server pada Ubuntu Server

  1. Update dan upgrade paket-paket yang ada:
sudo apt update && sudo apt upgrade -y

2. sudo apt update && sudo apt upgrade -y

dpkg -l | grep openssh-server

3. Jika belum terinstal, pasang dengan:

sudo apt install openssh-server -y

4. Periksa status SSH service:

sudo systemctl status ssh

5. Jika belum aktif, mulai layanan SSH:

sudo systemctl start ssh

6. Untuk memastikan layanan berjalan setiap kali server boot, aktifkan:

sudo systemctl enable ssh

7. Konfigurasi opsional:

sudo nano /etc/ssh/sshd_config
sudo systemctl restart ssh

8. Periksa status ufw

sudo ufw status
sudo ufw allow ssh
sudo ufw allow "port custom kita"
sudo ufw reload

Selesai. Semoga bermanfaat!

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *