unlock luks root using ssh

unlock luks root using ssh

install dracut-sshd:

zypper in -y dracut-sshd

add network module to initram:

echo 'add_dracutmodules+=" network "' | tee /etc/dracut.conf.d/90-network.conf

setup network:

add this to cmdline (for grub use /etc/default/grub file):


add your ssh public key to one of this files:


update initramfs & grub config:

/usr/bin/dracut -f -v

reboot & try:

systemctl reboot


ssh root@$IPADDRESS

after connecting you will see this:

Welcome to the early boot SSH environment. You may type


(or press "arrow up") to unlock your disks.

This shell will terminate automatically a few seconds after the
unlocking process has succeeded and when the boot proceeds. 


to unlock the partition you must type the following, press enter and enter the password:


(in fact, just press the "up arrow" and enter in order to get a password request)