Rehber

Uzaktan açma ile bir VPS'de tam disk şifrelemesi

İleri30 dk okumaGüncellendi 11 Haziran 2026
Kısa cevap

LUKS2, initramfs içindeki bir dropbear SSH arka plan programı ile kök dosya sistemini şifrelemenize ve her açılışta parolayı uzaktan girmenize olanak tanır. Sağlayıcı anahtarı asla elinde tutmaz, bu nedenle gücü kesilmiş bir disk şifreli metindir. Bu, tehlikeye atılmış bir hiper yöneticiye karşı koruma sağlamaz ve hiçbir sağlayıcı dürüstçe aksini iddia edemez.

01 Bunun tam olarak neyi koruduğunu anlayın

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 Şifreli bir köke kurun

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 initramfs'e dropbear ekleyin

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 Önyükleme ağını yapılandırın

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 Her yeniden başlatmadan sonra açın

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

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

Sık sorulan sorular

Ben uyurken sunucu yeniden başlatılırsa ne olur?

Açma isteminde bekler. Bu takastır: katılımsız yeniden başlatmalar imkansızdır, bu da anahtarı gerçekten size ait yapan şeydir.

OnionVPS diskimi açabilir mi?

Hayır. Parolayı asla saklamıyoruz ve kurtarma mekanizmamız yok. Kaybederseniz, veriler kaybolur.