Next: gpg-connect-agent, Previous: gpgsm-gencert.sh, Up: Helper Tools

### 7.7 Put a passphrase into the cache.

The `gpg-preset-passphrase` is a utility to seed the internal cache of a running `gpg-agent` with passphrases. It is mainly useful for unattended machines, where the usual `pinentry` tool may not be used and the passphrases for the to be used keys are given at machine startup.

Passphrases set with this utility don't expire unless the `--forget` option is used to explicitly clear them from the cache — or `gpg-agent` is either restarted or reloaded (by sending a SIGHUP to it). Nite that the maximum cache time as set with `--max-cache-ttl` is still honored. It is necessary to allow this passphrase presetting by starting `gpg-agent` with the `--allow-preset-passphrase`.