I tried added a key file and even a password txt but both lead to it still asking for me to type in the password.

Is it because the drive is encrypted? I tried placing the files at /, /boot, /root, /etc

Edit1: I’ve tried to install dropbear and give it ssh keys. I will try to reboot in the morning and see what happens

Edit2: signing in via ssh just says port 22 rejected not working :(

Edit3: neither dropbear for ssh or keyfile worked. I give up.

    • Kairos@lemmy.today
      link
      fedilink
      arrow-up
      1
      ·
      4 hours ago

      You have systemd right?

      The process is, to simplify:

      1. Generate a keyfile. You should make sure to chmod 600 it. Or better yet keep it in a folder.
      2. Add this keyfile to the LUKS container. You should make sure to test it.
      3. Edit /etc/crypttab to include a line to auto-unlock the LUKS container by UUID. You will also specify a logical name, which will mount the block device at /dev/mapper/<logicalname>
      4. Edit /etc/fstab to auto mount /dev/mapper/<logicalname> at /path/to/mountpoint

      On startup, systemd will read these files and dynamically create a service for it.