Panduan

Enkripsi disk penuh pada VPS dengan buka kunci jarak jauh

Lanjutan30 menit bacaDiperbarui 11 Juni 2026
Jawaban singkat

LUKS2 dengan daemon SSH dropbear di initramfs memungkinkan Anda mengenkripsi sistem file root dan memberikan sandi dari jarak jauh setiap kali boot. Penyedia tidak pernah memegang kunci, jadi disk yang mati adalah ciphertext. Ini tidak melindungi terhadap hypervisor yang disusupi, dan tidak ada penyedia yang bisa mengklaim sebaliknya dengan jujur.

01 Pahami persis apa yang dilindungi ini

Protects against: physical seizure of a powered-off disk, decommissioned hardware, a datacentre incident, a technician with physical access. Does not protect against: a compromised running hypervisor, or a compromise of the running instance. The key is in memory while the machine runs.

02 Instal ke root terenkripsi

On the Bastion line this is preconfigured. On any other instance, boot the distribution installer through the out-of-band console and choose an encrypted LVM layout.

03 Tambahkan dropbear ke initramfs

This is what lets you supply the passphrase over SSH before the root filesystem is mounted.

apt install -y dropbear-initramfs cryptsetup-initramfs
echo 'DROPBEAR_OPTIONS="-p 2222 -s -j -k"' >> /etc/dropbear/initramfs/dropbear.conf
cat ~/.ssh/id_ed25519.pub > /etc/dropbear/initramfs/authorized_keys
update-initramfs -u -k all

04 Konfigurasikan jaringan boot

The initramfs has no DHCP client by default; give it a static configuration matching your instance.

# /etc/initramfs-tools/initramfs.conf
IP=203.0.113.10::203.0.113.1:255.255.255.0::eth0:off

05 Buka kunci setiap kali reboot

Connect on the initramfs port and supply the passphrase. The boot then continues normally.

ssh -p 2222 [email protected]
# then: cryptroot-unlock

Pertanyaan yang sering diajukan

Apa yang terjadi jika server reboot saat saya tidur?

Ia menunggu di prompt buka kunci. Itulah trade-off: reboot tanpa pengawasan tidak mungkin, yang persis membuat kunci benar-benar milik Anda.

Bisakah OnionVPS membuka kunci disk saya?

Tidak. Kami tidak pernah menyimpan frasa sandi, dan tidak ada mekanisme pemulihan. Jika Anda kehilangannya, data akan hilang.