---
title: "ezgh keys generate-random"
description: "Generate random bytes."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh keys generate-random

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh keys generate-random --bytes n [flags]
```

Generate 1 to 1024 random bytes. They go to stdout as they are; -o json gives them in base64. No key is involved.

Part of [`ezgh keys`](/cli/reference/keys).

## Examples

```sh
ezgh keys generate-random --bytes 32 > seed.bin
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--bytes` | int |  | how many bytes, 1 to 1024 |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/keys-generate-random/index.mdx
