Anleitungen

Vollverschlüsselung eines VPS mit Remote-Unlock

Fortgeschritten30 Min. LesezeitAktualisiert 11. Juni 2026
Kurze Antwort

LUKS2 mit einem dropbear-SSH-Daemon im Initramfs ermöglicht es dir, das Root-Dateisystem zu verschlüsseln und die Passphrase bei jedem Boot remote einzugeben. Der Anbieter hält den Schlüssel nie, sodass eine ausgeschaltete Disk Chiffretext ist. Es schützt nicht gegen einen kompromittierten Hypervisor, und kein Anbieter kann das ehrlicherweise behaupten.

01 Verstehe genau, wovor das schützt

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 Installiere auf ein verschlüsseltes Root-Verzeichnis

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 Füge dropbear dem Initramfs hinzu

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 Konfiguriere das Boot-Netzwerk

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 Entsperre nach jedem Neustart

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

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

Häufig gestellte Fragen

Was passiert, wenn der Server neu startet, während ich schlafe?

Er wartet an der Entsperr-Aufforderung. Das ist der Tausch: unbeaufsichtigte Neustarts sind unmöglich, was genau macht, dass der Schlüssel wirklich dir gehört.

Kann OnionVPS meine Disk entsperren?

Nein. Wir halten niemals die Passphrase, und es gibt keinen Wiederherstellungsmechanismus. Wenn Sie sie verlieren, sind die Daten verloren.