2016-10-17 17:48:04 +00:00
|
|
|
---
|
2020-02-06 23:45:31 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: 'Commands: operator keygen'
|
2016-10-17 17:48:04 +00:00
|
|
|
description: >
|
2019-10-22 13:44:00 +00:00
|
|
|
The `operator keygen` command generates an encryption key that can be used for
|
|
|
|
Nomad server's gossip traffic encryption. The keygen command uses a
|
2016-10-17 17:48:04 +00:00
|
|
|
cryptographically strong pseudo-random number generator to generate the key.
|
|
|
|
---
|
|
|
|
|
2018-03-22 20:39:18 +00:00
|
|
|
# Command: operator keygen
|
2016-10-17 17:48:04 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
The `operator keygen` command generates an encryption key that can be used for
|
2020-02-06 23:45:31 +00:00
|
|
|
Nomad server's gossip traffic encryption. The keygen command uses a
|
2019-10-22 13:44:00 +00:00
|
|
|
cryptographically strong pseudo-random number generator to generate the key.
|
2016-10-17 17:48:04 +00:00
|
|
|
|
2020-12-18 13:29:38 +00:00
|
|
|
The resulting key is encoded in the [RFC4648] "URL and filename safe" base64
|
|
|
|
alphabet. If you use another tool such as OpenSSL to generate the gossip key,
|
|
|
|
you should pipe the input through the `base64(1)` command to ensure it is
|
2021-02-11 11:55:52 +00:00
|
|
|
safely encoded. For example: `openssl rand 32 | base64`
|
2020-12-18 13:29:38 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
## Usage
|
2016-10-17 17:48:04 +00:00
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
```plaintext
|
2018-03-22 17:56:06 +00:00
|
|
|
nomad operator keygen
|
2016-10-17 17:48:04 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
2020-05-18 20:53:06 +00:00
|
|
|
```shell-session
|
|
|
|
$ nomad operator keygen
|
2020-09-30 21:07:31 +00:00
|
|
|
6RhfKFZ5uYEaU6RgWzx69ssLcpiIkvnEZs5KBOQxvxA=
|
2016-10-17 17:48:04 +00:00
|
|
|
```
|
2020-12-18 13:29:38 +00:00
|
|
|
|
2021-03-31 13:43:17 +00:00
|
|
|
[rfc4648]: https://tools.ietf.org/html/rfc4648#section-5
|