The SSHKey generator provides SSH key pairs that you can use for authentication in your applications. It supports generating RSA and Ed25519 keys with configurable key sizes and comments.
| Key | Description |
|---|---|
| privateKey | the generated SSH private key |
| publicKey | the generated SSH public key |
| Parameter | Description | Default | Required |
|---|---|---|---|
| keyType | SSH key type (rsa, ecdsa, ed25519) |
rsa | No |
| keySize | Key size for RSA keys (2048, 3072, 4096) and ECDSA (256, 384, 521); ignored for ed25519 |
2048 / 256 | No |
| comment | Optional comment for the SSH key | "" | No |
Ed25519 SSH key (recommended):
{% include 'generator-sshkey.yaml' %}
RSA SSH key with custom size:
{% include 'generator-sshkey-rsa.yaml' %}
ECDSA SSH key:
{% include 'generator-sshkey-ecdsa.yaml' %}
Example ExternalSecret that references the SSHKey generator:
{% include 'generator-sshkey-example.yaml' %}
This will generate a Kind=Secret with keys called 'privateKey' and 'publicKey' containing the SSH key pair.