2

I would like to set a remote git repo that I will be pushing to regulary, which is easy to do. But I want to set up this remote repo to be on a LUKS (Linux Unified Key Setup) formatted drive (via cryptsetup) and I would like this drive to be encrypted at all times except when it is ready to accept the git pushes.

The disk will be connected at all times but I want it to be mounted and ready as a disk and dismounted when the pushing is done. Naturally I would have SSH access and the passwords.

I want this to be automated. I can manually login and mount the drive then unmount it but I do not want go through this multiple times a day and I want it to be as secure as possible, like not saving my passwords/pass files etc… on the remote PC.

What is the proper way to achieve this? Is this even doable?

1

1 Answer 1

1

You can use pam_mount module to mount the LUKS device on SSH login. Then just push over ssh and PAM will mount your encrypted device after you've entered your password.

See following for configuring the pam_mount:

http://mariospr.org/2008/03/08/automatically-mounting-luks-encrypted-partitions-with-pam_mount/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .