Pass expiration date param to subkey only via unattended key generation

Werner Koch wk at
Wed Oct 5 15:09:03 CEST 2022

On Wed,  5 Oct 2022 00:21, s7r said:

> Question is: keys can be generated unattended just fine, except I did
> not find a clear way to pass an Expire date param to the encryption
> subkey only, and not the primary key as well. The requirement is that


  gpg --quick-gen-key --batch test at ed25519 sign,cert

and then

  gpg --quick-add-key --batch FINGERPRINT cv25519 encr sign,cert 2y

Use --status-fd to get status lines which will return you the
fingerprint from the first command.  You might also want to use --yes to
allow creating a key with an already existing name or
--passphrase "mysecret" to avoid the pinentry.

(commands typed from memory so you may nned to consult the man page.)



The pioneers of a warless world are the youth that
refuse military service.             - A. Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <>

More information about the Gnupg-users mailing list