2

To use my PGP key I always have to enter my passphrase. But as it happens, I have to unlock the key only once for every session. The desired behaviour would be, that I have to unlock the key each time I want to use it so the passphrase is not remembered for the whole session.

The dialog for entering the passphrase provides a checkbox "Automatically unlock this key, whenever I'm logged in" but that is also not what I want. I recall this dialog in older versions of Ubuntu providing more options, like this:

enter image description here

But these options are never provided to me. So how can I configure Seahorse/GPG/Ubuntu to always locking the key after usage?

Mouagip
  • 133

2 Answers2

3

Settings for Seahorse are in 'gsettings': gpg-cache-method and gpg-cache-ttl. Answered here.

If you preffer, you could also have 'gpg-agent' manage the keys, check this.

Jonas Malaco
  • 1,453
  • 1
  • 13
  • 15
1

This can be configured by editing ~/.gnupg/gpg-agent.conf. Two options are of interest, default-cache-ttl is the time after using the key until it gets locked, max-cache-ttl is the time after unlocking the key.

man gpg-agent does not describe whether a max-cache-ttl value of 0 disables caching completely (as it invalidates instantly) or disables invalidation, but you will be able to realize easily. If not, think about setting it to 1 (seconds).

max-cache-ttl 0
Jens Erat
  • 5,051
  • 7
  • 31
  • 37