-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
key is removed from sshagent upon closing keepassxc #2980
Description
Unlike with the previous version, keys are removed from the ssh agent upon closing KeePassXC.
At first glance, it seemed the setting "Remove key from agent when database is closed/locked" although unchecked, was being ignored when closing the database by closing KeePassXC itself.
Expected Behavior
I expect the key to still be available in the agent after closing the database and KeePassXC 2.4.0, as was the case with KeePassXC 2.3.4.
Current Behavior
Current settings are as follows:
- on/checked: Add key to agent when database is opened/unlocked
- off/unchecked: Remove key from agent when database is closed/locked
- off/unchecked: Require user confirmation when this key is used
- off/unchecked: Remove key from agent after 600 seconds
The key remains in the agent after closing the database but not after closing KeePassXC. From what I recall, the key remained in the agent when using KeePassXC 2.3.4 after closing KeePassXC.
Possible Solution
Perhaps I was relying on an undefined/undocumented feature when using the previous version.
Steps to Reproduce
- Have a database with a private key (in my case this is an external file)
- Configure the SSH Agent for this entry with as above (add key when opened/unlocked and none of the remove required)
- Close KeePassXC
- Remove keys from agent (
$ ssh-add -D) - Start KeePassXC
- Open/Unlock database
- Verify that the key has been added to the agent (
$ ssh-add -l) - Close the database (Database Menu / close database)
- Verify that the key is still in the agent (
$ ssh-add -l) - Close KeePassXC (KeePassXC Menu / Quit KeePassXC)
- Verify that the key is no longer in the agent (
$ ssh-add -l)
Context
My workflow previously had been to open the database with KeePassXC to add several keys to the ssh agent. This was followed by closing KeePassXC, opening later if/when needed (for other credentials).
My current workaround is to keep KeePassXC, locking and unlocking the database as needed, so that the keys stay in the ssh agent.
Before creating this issue report I searched for already reported issues and came across the following, which seemed related:
#2902
Debug Info
KeePassXC - Version 2.4.0
Revision: c51752d
Libraries:
- Qt 5.12.2
- libgcrypt 1.8.4
Operating system: macOS Mojave (10.14)
CPU architecture: x86_64
Kernel: darwin 18.5.0
Enabled extensions:
- Auto-Type
- Browser Integration
- SSH Agent
- KeeShare (only unsigned sharing)
- YubiKey
- TouchID