Request passphrase from remote device on boot (phone, workstation, etc) in Linux

0

I have an encrypted encfs mount on a server running Ubuntu 18.04.

I manually have to login to mount the drive, entering my passphrase. Storing the passphrase on the server would make the encryption pointless.

I'd like to setup a routine to automomount on boot, but preferably the routine or script would halt mounting of my encrypted drive and request authorization or in best case even the passphrase string from a remote device (such as a phone, a workstation, via email etc).

In other words, when the machine boots it requests the passphrase or yes/no authorization from somewhere else. Until that has completed, it waits...

Example:

  • Ubuntu 18.04 server boots
  • Gets to my custom script where it mounts the encrypted drive after boot.
  • Sends push notification to phone, workstation, or email etc (so far I haven't found any solution) asking for authorization to mount the drive.
  • On the external device I can (1) YES / NO authorize the mount process, or even better (2) enter the mount passphrase which will be passed back to encfs.

If there is no such method, I may settle just sending an email or pushover notification from the server to prompt to login via SSH and authorize the mount or mount manually...

Alex

Posted 2019-12-11T07:03:33.330

Reputation: 1

So basically like a two-factor authentication for your own system’s personal purpose? – JakeGould – 2019-12-11T12:20:22.813

It's kind of like two-factor, yes, but it's a server not a personal use computer. I just assumed there would be an established method to interactively mount encrypted drives etc on servers nowadays - kind of like pushover, but taking user input and passing it back to the machine. – Alex – 2019-12-13T05:19:23.710

No answers