0

Sometimes I'd like to ssh to a machine, mount my encrypted home directory and disconnect and keep the directory mounted.

What I managed already to do is

  • ssh to my machine (without password only public keys are allowed for security reasons)
  • create a tmux session
  • mount the file system in the tmux session
  • cd into the home directory
  • execute some script that will run for a long time
  • detach the tmux session
  • logout

if I login again and attach to the tmux session, I see, that my script continues to run as long as it uses only relative path names.

However if I access absolute path names I see, that my home directory has been unmounted.

Is there any trick to keep it mounted.

4
  • 2
    That's contrary to the intent of encrypted home directories. Make a separate directory, not under $HOME/ that will stick around.
    – waltinator
    Sep 21, 2021 at 22:00
  • The exact intent of an encrypted home directory leaves space for interpretation. Till now I used the machine as a desktop. and if I needed the filesystem to be available I did a graphical log in, started the necessary tasks and locked the screen. reconnected and logged out when done. Now I want to remove the display and do the same over ssh access. log in, start processes (disconnect instead of locking the screen) and reconnect and unmount when done. Encrypted home directories are still very useful as stolen disks / PCs have no readable data.
    – gelonida
    Sep 21, 2021 at 22:12
  • Could you use full disk encryption instead and leave the home directories unencrypted?
    – Baa
    Sep 21, 2021 at 22:22
  • This is an interesting idea for new machines However the machine is already setup so if possible I don't want to change the disk layout.
    – gelonida
    Sep 21, 2021 at 22:39

0

You must log in to answer this question.

Browse other questions tagged .