COROSYNC-KEYGEN(8)

πŸ“¦
version 3.1.10 Β· 2 versions
  • 3.1.10 Β· debian bookworm, debian trixie, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute (latest)
  • 3.1.10 Β· ubuntu stonking
, in debian bookworm, debian trixie, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute

πŸ’– COROSYNC-KEYGEN πŸ’–

okay bestie, welcome to the corosync-keygen page from the System Manager's Manual section 8 β€” yes it's a sysadmin man page but it's also kinda iconic so let's go 🫢


✨ NAME ✨

corosync-keygen β€” generate an authentication key for Corosync. that's it. that's the job. πŸ’…


🌸 SYNOPSIS 🌸

corosync-keygen [-k <filename>] [-m <randomfile>] [-s size] [-l] [-h]

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea πŸ“ β€” if you want to set up corosync using cryptographic techniques to make sure your messages are authentic and private (yes, the whole "nobody's reading my cluster mail" vibe), you're gonna need to generate a private key. no key, no privacy. periodt.

corosync-keygen is the girl that makes that key and drops it at /etc/corosync/authkey, or wherever you tell it with the -k option. ✨

IMPORTANT BESTIE: this private key has to be copied to every processor in the cluster. every. single. one. if the private key isn't the same for every node, the nodes with nonmatching private keys will not be able to join the same configuration. it's giving group project where one person has a different doc πŸ’€

so copy the key to some security transportable storage, or just use ssh to send it node to node. then install it with this command:

unix#: install -D --group=0 --owner=0 --mode=0400 /path_to_authkey/authkey /etc/corosync/authkey

and if you ever see a message saying Invalid digest coming from the corosync executive? that means the keys are not consistent between processors. vibe check failed. go fix your keys. 😭


πŸ’… OPTIONS πŸ’…

  • -k <filename> β€” this one specifies the fully qualified path</> to the shared key you wanna create. the default is /etc/corosync/authkey. she's the main character option fr fr πŸ‘‘
  • -r β€” random number source file. default is /dev/urandom. for example, /dev/random may be used when you really superb randomness is needed. fancy. ✨
  • -s size β€” size of the generated key in bytes. default is 256 bytes. the allowed range is <128, 4096>. don't get greedy now. πŸŽ€
  • -l β€” this option is not used and it's kept only for compatibility. she's just there. standing. existing. we respect her anyway. πŸ’€
  • -h β€” print basic usage. the classic "help me please" button. 🫢

🌈 EXAMPLES 🌈

generate the key β€” the basic slay:

# corosync-keygen
Corosync Cluster Engine Authentication key generator.
Gathering 2048 bits for key from /dev/urandom.
Writing corosync key to /etc/corosync/authkey

generate a longer key and store it in the /tmp/authkey file β€” she's bigger, she's bolder, she's living in /tmp:

$ corosync-keygen -s 2048 -k /tmp/authkey
Corosync Cluster Engine Authentication key generator.
Gathering 16384 bits for key from /dev/urandom.
Writing corosync key to /tmp/authkey.

generate a superb key using /dev/random β€” this one makes you work for it, keyboard-mashing era 😭:

# corosync-keygen -r /dev/random
Gathering 2048 bits for key from /dev/random.
Press keys on your keyboard to generate entropy.
Press keys on your keyboard to generate entropy (1128 bits still needed).
Press keys on your keyboard to generate entropy (504 bits still needed).
Press keys on your keyboard to generate entropy (128 bits still needed).
Press keys on your keyboard to generate entropy (32 bits still needed).
Writing corosync key to /etc/corosync/authkey.

πŸ‘€ SEE ALSO πŸ‘€

go read those next bestie, iykyk πŸ’œ


πŸŽ€ AUTHOR πŸŽ€

Angus Salkeld β€” thank you for your service king 🫑✨


and that's a wrap on the COROSYNC-KEYGEN(8) page from the System Manager's Manual, dated 2019-04-09. she's a little vintage, she's still serving πŸ’– bye bestie, go generate some keys πŸŒΈπŸ¦‹