Debian: Unlock LUKS root partition remotely by SSH using dropbear
- You want to unlock a system remotely during boot process.
- Your root partition is a LVM volume.
- Your LVM setup is fully encrypted with LUKS.
- You’re running Debian 10 or above (buster, bullseye, bookworm) on the remote system.
This tutorial describes an option to unlock your system remotely using SSH and dropbear.
apt-get install -yy dropbear-initramfs cryptsetup-initramfs lvm2
Configuration directory and files for dropbear changes in Debian 12 DROPBEAR_DIR=/etc/dropbear/initramfs DROPBEAR_CONFIG=DROPBEAR_DIR/dropbear.conf if [ $(cut -d. -f1 /etc/debian_version) -lt 12 ]; then DROPBEAR_DIR=/etc/dropbear-initramfs DROPBEAR_CONFIG=DROPBEAR_DIR/config fi
echo 'DROPBEAR_OPTIONS="-RFEsjk -c cryptroot-unlock"' > $DROPBEAR_CONFIG