4
0

corosync-keygen.8 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. .\"/*
  2. .\" * Copyright (C) 2010-2019 Red Hat, Inc.
  3. .\" *
  4. .\" * All rights reserved.
  5. .\" *
  6. .\" * Author: Angus Salkeld <asalkeld@redhat.com>
  7. .\" *
  8. .\" * This software licensed under BSD license, the text of which follows:
  9. .\" *
  10. .\" * Redistribution and use in source and binary forms, with or without
  11. .\" * modification, are permitted provided that the following conditions are met:
  12. .\" *
  13. .\" * - Redistributions of source code must retain the above copyright notice,
  14. .\" * this list of conditions and the following disclaimer.
  15. .\" * - Redistributions in binary form must reproduce the above copyright notice,
  16. .\" * this list of conditions and the following disclaimer in the documentation
  17. .\" * and/or other materials provided with the distribution.
  18. .\" * - Neither the name of the MontaVista Software, Inc. nor the names of its
  19. .\" * contributors may be used to endorse or promote products derived from this
  20. .\" * software without specific prior written permission.
  21. .\" *
  22. .\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  23. .\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  24. .\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  25. .\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  26. .\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  27. .\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  28. .\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  29. .\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  30. .\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  31. .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  32. .\" * THE POSSIBILITY OF SUCH DAMAGE.
  33. .\" */
  34. .TH COROSYNC-KEYGEN 8 2019-04-09
  35. .SH NAME
  36. corosync-keygen \- Generate an authentication key for Corosync.
  37. .SH SYNOPSIS
  38. .B "corosync-keygen [\-k <filename>] [-m <randomfile>] [\-s size] [\-l] [\-h]"
  39. .SH DESCRIPTION
  40. If you want to configure corosync to use cryptographic techniques to ensure authenticity
  41. and privacy of the messages, you will need to generate a private key.
  42. .PP
  43. .B corosync-keygen
  44. creates this key and writes it to /etc/corosync/authkey or to file specified by
  45. -k option.
  46. .PP
  47. This private key must be copied to every processor in the cluster. If the
  48. private key isn't the same for every node, those nodes with nonmatching private
  49. keys will not be able to join the same configuration.
  50. .PP
  51. Copy the key to some security transportable storage or use ssh to transmit the
  52. key from node to node. Then install the key with the command:
  53. .PP
  54. unix#: install -D --group=0 --owner=0 --mode=0400 /path_to_authkey/authkey /etc/corosync/authkey
  55. .PP
  56. If a message "Invalid digest" appears from the corosync executive, the keys
  57. are not consistent between processors.
  58. .PP
  59. .SH OPTIONS
  60. .TP
  61. .B -k <filename>
  62. This specifies the fully qualified path to the shared key to create.
  63. .br
  64. The default is /etc/corosync/authkey.
  65. .TP
  66. .B -r
  67. Random number source file. Default is /dev/urandom. As an example /dev/random may be
  68. used when really superb randomness is needed.
  69. .TP
  70. .B -s size
  71. Size of the generated key in bytes. Default is 256 bytes. Allowed range is <128, 4096>.
  72. .TP
  73. .TP
  74. .B -l
  75. Option is not used and it's kept only for compatibility.
  76. .TP
  77. .B -h
  78. Print basic usage.
  79. .SH EXAMPLES
  80. .TP
  81. Generate the key.
  82. .nf
  83. # corosync-keygen
  84. Corosync Cluster Engine Authentication key generator.
  85. Gathering 2048 bits for key from /dev/urandom.
  86. Writing corosync key to /etc/corosync/authkey
  87. .fi
  88. .TP
  89. Generate longer key and store it in the /tmp/authkey file.
  90. .nf
  91. $ corosync-keygen -s 2048 -k /tmp/authkey
  92. Corosync Cluster Engine Authentication key generator.
  93. Gathering 16384 bits for key from /dev/urandom.
  94. Writing corosync key to /tmp/authkey.
  95. .fi
  96. .TP
  97. Generate superb key using /dev/random
  98. .nf
  99. # corosync-keygen -r /dev/random
  100. Gathering 2048 bits for key from /dev/random.
  101. Press keys on your keyboard to generate entropy.
  102. Press keys on your keyboard to generate entropy (1128 bits still needed).
  103. Press keys on your keyboard to generate entropy (504 bits still needed).
  104. Press keys on your keyboard to generate entropy (128 bits still needed).
  105. Press keys on your keyboard to generate entropy (32 bits still needed).
  106. Writing corosync key to /etc/corosync/authkey.
  107. .fi
  108. .SH SEE ALSO
  109. .BR corosync_overview (7),
  110. .BR corosync.conf (5),
  111. .SH AUTHOR
  112. Angus Salkeld
  113. .PP