Cenahost Logocenahost
Beranda
Free Trial
Blog
Kembali ke Semua Artikel
Server & Linux•15 Oktober 2026•7 min read

Langkah Awal Mengamankan Cloud VPS Ubuntu: SSH Key, Port Hardening & UFW

Praktik terbaik mengamankan instance KVM VPS baru: menonaktifkan password authentication, mengonfigurasi UFW firewall, dan mengatur proteksi brute-force dengan Fail2ban.

Tim Linux Security
Systems & Security Engineer
Langkah Awal Mengamankan Cloud VPS Ubuntu: SSH Key, Port Hardening & UFW

Saat instance Cloud VPS KVM Anda selesai di-deploy dan Anda menerima kredensial root via email, server Anda langsung terekspos ke internet publik. Dalam hitungan jam, bot scanner otomatis di internet akan mulai mencoba melakukan brute-force port SSH Anda.

Berikut adalah langkah Server Hardening standar industri yang wajib Anda terapkan pada Ubuntu 22.04 / 24.04 LTS:

1. Buat User Non-Root dengan Hak Sudo

Menjalankan seluruh perintah sebagai root meningkatkan risiko kesalahan fatal. Buat user operator baru:

bash
Cenahost Production Config
# Buat user baru (contoh: deployer)
adduser deployer

# Berikan hak akses sudo
usermod -aG sudo deployer

2. Gunakan Pasangan Kunci ED25519 & Matikan Login Password

Algoritma ED25519 jauh lebih aman, cepat, dan ringkas dibanding RSA lama. Jalankan perintah ini di komputer lokal Anda:

bash
Cenahost Production Config
# Di terminal komputer lokal Anda:
ssh-keygen -t ed25519 -C "admin@cenahost"

# Salin public key ke VPS:
ssh-copy-id -i ~/.ssh/id_ed25519.pub deployer@<IP_VPS_ANDA>

Setelah Anda berhasil login menggunakan key, buka konfigurasi SSH di VPS:

bash
Cenahost Production Config
sudo nano /etc/ssh/sshd_config.d/01-hardening.conf

Isi dengan aturan keamanan ketat berikut:

text
Cenahost Production Config
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
MaxAuthTries 3
X11Forwarding no

Uji konfigurasi lalu restart SSH daemon:

bash
Cenahost Production Config
sudo sshd -t && sudo systemctl restart sshd

3. Konfigurasi Firewall UFW (Uncomplicated Firewall)

Tutup semua port masuk secara default dan hanya buka port yang esensial:

bash
Cenahost Production Config
# Kebijakan default: tolak semua inbound, izinkan outbound
sudo ufw default deny incoming
sudo ufw default allow outgoing

# Buka port SSH dengan rate-limiting (mencegah spam koneksi)
sudo ufw limit 22/tcp comment 'SSH Port'

# Buka port web server jika diperlukan
sudo ufw allow 80/tcp comment 'HTTP'
sudo ufw allow 443/tcp comment 'HTTPS'

# Aktifkan firewall
sudo ufw enable

4. Lindungi Server dengan Fail2ban

Fail2ban secara otomatis memindai log sistem dan memblokir IP yang gagal login berulang kali:

bash
Cenahost Production Config
sudo apt update && sudo apt install fail2ban -y
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo systemctl enable --now fail2ban

Periksa IP yang diblokir menggunakan:

bash
Cenahost Production Config
sudo fail2ban-client status sshd

Dipublikasikan oleh Tim Engineering Cenahost

Panduan diuji langsung pada klaster produksi node Cenahost di Datacenter Equinix SG1 Singapore dan Cyber 1 Jakarta.

Artikel Teknis Terkait

Lihat semua artikel
Panduan Optimasi TPS 20.0 di Minecraft PaperMC: Aikar's Flags & Entity Ticking
Minecraft & Game

Panduan Optimasi TPS 20.0 di Minecraft PaperMC: Aikar's Flags & Entity Ticking

Mengenal Arsitektur Cenahost Web Panel: Nginx FastCGI, AutoSSL & PHP 8.3
Web Hosting

Mengenal Arsitektur Cenahost Web Panel: Nginx FastCGI, AutoSSL & PHP 8.3

Deploy Bot WhatsApp Baileys & Discord.js 24/7 di Pterodactyl Game Panel
Bot & Worker

Deploy Bot WhatsApp Baileys & Discord.js 24/7 di Pterodactyl Game Panel

Siap Memulai Website &
Server Game Anda?

Coba gratis 15 hari tanpa kartu kredit. Nikmati kemudahan deploy otomatis, migrasi gratis tanpa downtime, dan bantuan teknis 24/7.

Mulai Gratis 15 HariKonsultasi WhatsApp
Cenahost Logocenahost.id

Stay up to date with Cenahost

Infrastruktur Cloud & Game Server Modern

Datacenter Indonesia & Singapore • Latensi Rendah

Produk

  • Registrasi Domain MurahPromo
  • Web Hosting Cena Panel
  • Minecraft Game Server
  • Discord & Bot Hosting
  • Cloud VPS KVM NVMe
  • Daftar Harga & Paket

Fitur Produk

  • NVMe PCIe 4.0 Storage
  • LiteSpeed Enterprise
  • Pterodactyl Game Panel
  • Proteksi Anti-DDoS Otomatis
  • Daily Automatic Backup
  • Free SSL Let's Encrypt

Solusi Pengguna

  • Server Game & Komunitas
  • Web Developer & Freelance
  • Software House & Agensi
  • Bisnis & Toko Online
  • DevOps & Automation

Solutions by Industry

  • Gaming & Esports
  • E-Commerce & Retail
  • Corporate & Media
  • API & Microservices

Infrastructure

  • Datacenter Indonesia
  • Datacenter Singapore (Equinix SG1)
  • Stok Server & Node
  • Status Server & Uptime

Sumber Daya

  • Area Klien & Billing
  • Dokumentasi & Panduan
  • Panel Game (Pterodactyl)
  • Hubungi Kami (WhatsApp 24/7)
  • Pusat Bantuan / FAQ

Company

  • Blog & ArtikelNew
  • Tentang Cenahost
  • Program Afiliasi
  • Hubungi Sales

Kebijakan & Legalitas

  • Syarat Layanan (TOS)
  • Kebijakan Privasi
  • Kebijakan Pengembalian
  • Service Level Agreement (98%)
Lokasi Datacenter•Indonesia 🇮🇩 & Singapore 🇸🇬
WhatsApp: +62 815-4009-1863•Email: admin@cenahost.id

© 2026 Cenahost Indonesia. Seluruh hak cipta dilindungi.

Privacy PolicyTerms and ConditionsPayment TermsCookie Policy