Guía

Cifrado de disco completo en un VPS con desbloqueo remoto

Avanzado30 min de lecturaActualizado 11 de junio de 2026
Respuesta corta

LUKS2 con un daemon SSH dropbear en el initramfs te permite cifrar el sistema de archivos raíz y proporcionar la frase de contraseña de forma remota en cada arranque. El proveedor nunca tiene la clave, por lo que un disco apagado es texto cifrado. No protege contra un hipervisor comprometido, y ningún proveedor puede afirmar honestamente lo contrario.

01 Entiende exactamente qué protege esto

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 Instala con una raíz cifrada

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 Añade dropbear al 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 Configura la red de arranque

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 Desbloquea después de cada reinicio

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

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

Preguntas frecuentes

¿Qué pasa si el servidor se reinicia mientras duermo?

Espera en el prompt de desbloqueo. Ese es el intercambio: los reinicios no supervisados son imposibles, lo que es exactamente lo que hace que la clave sea genuinamente tuya.

¿Puede OnionVPS desbloquear mi disco?

No. Nunca tenemos la frase de contraseña y no existe ningún mecanismo de recuperación. Si la pierdes, los datos desaparecen.