dlech / KeeAgent

ssh agent plugin for KeePass 2.x
http://lechnology.com/software/keeagent
Other
531 stars 35 forks source link

Error while loading key from entry - Ed25519 #266

Closed netson closed 2 years ago

netson commented 5 years ago

I'm having issues loading a Ed25519 key into KeeAgent; I get the following error message:

KeeAgent: Error while loading key from entry 'foo/key'
Agent Failure
Possible causes:
- Key is already loaded in agent
- Agent is locked

The key has not been loaded yet (all other keys are RSA keys and I checked the fingerprints). This error occurs when I try to add the key to KeeAgent while its running, or when I start KeePass. Turning off the "Allow KeeAgent to use this entry" checkbox makes the error go away on startup.

I also found this (similar, but not quite the same) issue ([/issues/205]), which suggests that Ed25519 keys are supported.

I used the following 3 test commands to generate the keys, all of which result in the same failure:

TEST 1: ssh-keygen -t ed25519 -o -a 100 -C "ed25519 with rounds" -f ./mytested25519key1
TEST 2: ssh-keygen -t ed25519 -C "ed25519 with rounds" -f ./mytested25519key2
TEST 3: ssh-keygen -t ed25519 -C "ed25519withrounds" -f ./mytested25519key3

I also checked if I had a separate SSH agent running on my system, which was not the case. Also, when adding all 3 keys to KeePass, I get the error message 3 times on startup. The other keys (all RSA) work just fine.

I am using the following:

OpenSSL         1.1.0h  27 Mar 2018 (Library: OpenSSL 1.1.1c  28 May 2019)

Distributor ID: LinuxMint
Description:    Linux Mint 18.3 Sylvia
Release:        18.3
Codename:       sylvia

KeePass         2.41
KeeAgent        0.10.1.0 (installed from PPA)

Any idea what is happening here?

netson commented 5 years ago

Since I was running into a similar problem when using FileZilla on the same system, I thought I'd give it a go on my laptop, running a newer version of Mint:

OpenSSL:        OpenSSL 1.1.1  11 Sep 2018

Distributor ID: LinuxMint
Description:    Linux Mint 19.1 Tessa
Release:    19.1
Codename:   tessa

KeePass         2.41
KeeAgent        0.10.1.0 (installed from PPA)

Everything works as expected on the laptop, so I'm guessing this has to do with one of the system packages which is outdated on Mint 18/Ubuntu 16? It seems unspecific to KeeAgent, but I could be wrong; maybe it's worth investigating?

tnug384 commented 5 years ago

Have this problem on windows, too. After I kill gpg-agent (gpg4win) KeePass starts without a problem.

dlech commented 2 years ago

If you are running KeeAgent in client mode, then this error comes from the remote agent. If this is still an issue, please re-open with updated details on the current OS and ssh versions.