Score:0

Does centos Stream (8 or 9) support crypttab keyscript?

om flag

I have had setting up network unlock for my Centos based hypervisor for several years, and I finally set the time aside to try it a second time and am running into a road block. I do not want to ssh to a dropbear initramfs, I want this to be automatic as long as I've unlocked a central server.

The basic concept I want to achieve:

  1. Store the keyfile/password on an "always on" system, within a luks encrypted volume (just a raw file encrypted as luks and an ext4 filesystem)
  2. The keyfile/password for each boot volume I need to unlock is stored in this volume
  3. When I need to unlock systems after a reboot, I ensure this volume is unlocked and mounted
  4. The encrypted system has a keyscript, ssh-key, and initramfs networking enabled
  5. The keyscript runs "ssh [email protected] cat /mnt/keys/hostname" which outputs the password in a simple implementation
  6. This would then unlock the boot volume and the system would startup without manual intervention, such as connecting to a dropbear/ssh and running commands
  7. When no-systems need to be unlocked, the keyfile volume is closed on the keyserver

I run Centos Stream, and it appears that keyscript is not supported in centos stream 8 per "man crypttab"

I've installed the required files, and in the pre-boot environment, I can run /usr/local/sbin/keyscript.sh and see the password written to stdout, however two issues appear

  1. without _netdev in crypttab, the network startsup immediately after prompting for the password
  2. with netdev, no ssh connection is seen on the keyserver, indicating the keyscript is not being run

Is keyscript support in Centos stream 8 enabled by a package I'm not aware of, or is this a feature of Centos stream 9? Otherwise, it looks like I will be switching to Debian for the next rebuild of my hypervisors, which is disappointing.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.