Skip to content
This repository was archived by the owner on Apr 17, 2026. It is now read-only.

desktop: forget GPG and SSH credentials on screen lock.#34

Draft
kousu wants to merge 1 commit into
masterfrom
lock-creds
Draft

desktop: forget GPG and SSH credentials on screen lock.#34
kousu wants to merge 1 commit into
masterfrom
lock-creds

Conversation

@kousu

@kousu kousu commented Feb 13, 2026

Copy link
Copy Markdown
Owner

Lock gpg-agent and ssh-agent when the screen locks.

Keys already time out after 45min addition to timing out keys (which I have set to 45m for both

but on my phone my keys timeout when my screen locks, and that feels safer. I want to reproduce this on my laptop.

@kousu

kousu commented Feb 13, 2026

Copy link
Copy Markdown
Owner Author

Some stumbling blocks:

  • gnome-keyring-daemon never locks keys once you tell it to save their passphrases. A screen lock doesn't lock keys, restarting the agent doesn't lock keys. Which is like..what are you doing? They're unlocked at login (or if you've changed your password so it's different from the keychain password, at the first time something wants to access the keychain). I suppose this is because they want to make sure that e.g. sshfs or nextcloud sync keeps working in the background, but I would really like my ssh and gpg keys to not just be out in the open like that.
  • you can work around this partly by systemctl --user mask gcr-ssh-agent.socket and then falling back on my pre-existing ssh-agent
  • unclear to me if gnome-keyring-daemon does or doesn't implement the gpg protocol
  • I could migrate fully to gpg-agent and disable gnome-keyring-daemon and ssh-agent, then 'clearing passwords' would just be the 'gpg-connect-agent reloadagent' command; requires some fiddling to make sure it uses the appropriate pinentry under all environments

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant