Nick Sandor asked:
It is easy to unlock a LUKS drive over SSH when the drive takes text passwords:
cryptsetup luksOpen /dev/sdb1 mylockeddrive
Then entering the password at prompt.
Is there a way of unlocking these drives when a key file is used, short of copying the key file on the remote system?
Send the key via a pipe and tell cryptsetup to read it from standard input.
cat keyfile | ssh remotehost "cryptsetup open --type luks --key-file - /dev/sdb1"
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.