Jump to content

i am away from home a lot and use ssh on my windows to connect to my Ubuntu 16.04 desktop at home. my desktop is encrypted using Luks. the only problem i have is that when ever i have to reboot for whatever reason i have to put in the encryption password in person. is there a way to make it so it only prompts for the password after a shutdown and not as a reboot?

Link to comment
https://linustechtips.com/topic/950134-authencated-reboots-ubuntu/
Share on other sites

Link to post
Share on other sites

This is kind of an old article and it isn't exactly what you've asked, but it should work.
Unlocking a LUKS encrypted root partition remotely via SSH

Desktop: HP Z220 Workstation, 12 GB RAM, 2x500 GB HDD RAID0, + GTX 1060 3GB

Laptop: ThinkPad T430, 8 GB RAM, 1x120 GB SSD

Link to post
Share on other sites

@TakataruMC: I'm not sure how that answers BasicallyAMods question.

 

However, in general I do not think it is a good idea to try to do what you want. You need to store the password in clear text somewhere (as in the example where the unlocking is done via SSH), which might work for you, but obviously is a huge security hazard, in case someone malicious can get into the file holding your password (which might even make the point of having encryption moot).

 

In case you were asking for the computer to know wether it has rebooted or powered on from poweroff, well ... essentially from the computer's point of view, these are exactly the same thing. You will need to store the encryption password somewhere volatile, that survives reboots (but not poweroff). Again there would be some security problems here.

Link to post
Share on other sites

  • 2 weeks later...

@Wild Penquin the key file you need to save is the ssh key, not the luks key.

10 minutes ago, BasicallyAMod said:

thank you for your answers.

if you want to try the method used in the article, just substitute "MyS3cr3tK3y" with your actual password and, if it's not too outdated, it should work. To avoid people stealing your password from your bash history simply disable it in the current shell:

unset HISTFILE

This setting will only be valid for the terminal you're using and won't affect the rest of your system.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×