Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to load key from attachment: "checkint does not match in private key" #427

Open
DevSolar opened this issue Jan 12, 2025 · 0 comments

Comments

@DevSolar
Copy link

DevSolar commented Jan 12, 2025

Environment:

KeePass 2.57.1
KeeAgent 0.13.8
OpenSSH 9.9p1 (Cygwin)

Steps to reproduce:

  • Create new database Database.kdbx (Master Password is "KeePass")
  • Create new key "SSH" in database
  • Create new SSH key in Cygwin terminal (ssh-keygen -C [email protected] -f ~/.ssh/id_foo) using the password from the KeePass entry as pass phrase
  • Edit the database key, adding ~/.ssh/id_foo as attachment
  • Set KeeAgent options: Allow to use this entry, Manage Key Files / From Attachment / id_foo)

Note: The comment ("[email protected]") doesn't appear in the Key Info section. I've seen there is at least one other issue mentioning this, and it's not the problem I am having -- but perhaps there's some underlying common key parsing issue here.

  • Close Edit Key dialog
  • Select Tools / KeeAgent dialog
  • Add Key / From KeePass
  • Select the SSH key just added to the database

Expected: Key gets loaded by KeeAgent.

Observed: Error dialog reading:

KeeAgent: Error while loading key from entry "Database\SSH"
Could not load file from attachment "id_foo"
checkint does not match in private key.

Possible causes:

  • Passphrase was entered incorrectly
  • File is corrupt or has been tampered

Checks:

Saving the attachment from KeePass yields an identical file to the one in ~/.ssh/id_foo. Verifying the key with "ssh_keygen -y" (and the password from KeePass) works as expected.

I added the database (including the SSH key) as attachment.

Database.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant