Jump to content

Remote disk unlocking: Difference between revisions

Workaround broken >> special characters being displayed as >>
(Fix broken networkmanager DNS with boot.initrd.network.enable, see: https://github.com/NixOS/nixpkgs/issues/63941#issuecomment-2081126437. Use ed25519 host key. Use postCommands to directly prompt for password, shell option did not work for me.)
(Workaround broken >> special characters being displayed as >>)
Line 1: Line 1:
If you want to unlock your computer remotely via SSH or even through Tor, and you are facing the problem, that you can’t reach your computer before your computer is unlocked. Tor will help you to reach your computer, even during the boot process.
If you want to unlock your computer remotely via SSH or even through Tor, and you are facing the probllem, that you can’t reach your computer before your computer is unlocked. Tor will help you to reach your computer, even during the boot process.


== Setup ==
== Setup ==
Line 9: Line 9:
</syntaxhighlight>
</syntaxhighlight>


Enable SSH daemon in initrd
Enable SSH daemon in initrd≥


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
Line 26: Line 26:
     postCommands = ''
     postCommands = ''
       # Automatically ask for the password on SSH login
       # Automatically ask for the password on SSH login
       echo 'cryptsetup-askpass || echo "Unlock was successful; exiting SSH session" && exit 1' >> /root/.profile
       echo 'cryptsetup-askpass || echo "Unlock was successful; exiting SSH session" && exit 1' \
        | tee /root/.profile
     '';
     '';
   };
   };
3

edits