2

Is it possible to automatically mount an encrypted partition on the server when logging in using SSH keys instead of the regular password?

The home folder is a luks-encrypted partition. The current pam_mount setting is as follows:

<volume user="name" path="/dev/mapper/my_folder" mountpoint="~" />

2 Answers 2

1

~/.ssh/authorized_keys allows you to specify the command that will execute upon ssh login.

You can write a shell script that will mount partition (even ask a password for it) and then "exec bash" or "exec zsh" etc.

0

It puts another tool into the mix, but using sec might be an option.

"Install sec. Visit the author's website and read the documentation there. Set up sec to monitor /var/log/auth.log and run your script."

from here: http://ubuntuforums.org/showthread.php?t=843736

you could have it run a mount script and add a keyfile for the luks volume to get past entering a password.

That's the best I've got...

You must log in to answer this question.

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