Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • thanks for the answer! what about using an encrypted luks container/file (not a partition), would that work across sshfs? Commented Nov 26, 2019 at 10:04
  • something like /srv/encrypted.img <---sshfs----> /client/encrypted.img -> /dev/loop0 -> cryptsetup luksOpen -> mount /dev/mapper/dm0 /mnt/decrypted Commented Nov 26, 2019 at 10:28
  • Yeah, that will probably work. You can also use cryptmount which way of operation looks more compatible to what you want to do. Anyway, with that solution, take care of your private key which is usually stored under /etc/ ... if it's lost, your data are too. Commented Nov 26, 2019 at 10:37
  • I can confirm now: yes I can mount and decrypt luks remotely (via sshfs) if I use a luks container (not a luks partition) to hold the encrypted data. I just had to create a luks container (a file that holds internally the encrypted filesystem), this file is a normal file on a mounted partition so it can be mounted remotely via sshsfs and decrypted later (via loop device -> mapper device -> mount). Thanks Commented Nov 26, 2019 at 16:00