suggest-key

Last Updated : Aug 28, 2026 |
Generates a random string that you can use as a pre-shared key for IKE. You must use the same key on both peers.
Prolog information

Syntax

suggest-key [key-length] [key-type {alphanumeric | hexadecimal}]

Parameters

Parameter
Description
Possible Values
Default Value
key-length
The length of the key to be generated
8-127 alphanumerical characters, or
8-64 bytes in hexadecimal notation
32 characters
key-type
Keyword indicating the type of key to be generated
alphanumeric or hexadecimal
alphanumeric

User level

read-write

Context

crypto isakmp peer

Examples

To generate a cryptographic-grade random string:
Gxxx-001(config-peer:149.49.70.1)# suggest-key
The suggest key: GNpi1odGNBrB5z4GJLz156jDmRWAGFES
To generate a random string of eight alphanumeric characters:
Gxxx-001(config-peer:149.49.70.1)# suggest-key 8 alphanumeric
The suggest key: iEvKoQ1e