keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
21.4k stars 1.48k forks source link

Mac ed25519-sk SSH key agent integration won't work #8922

Open dombyte opened 1 year ago

dombyte commented 1 year ago

Overview

Adding an ed25519-sk ssh key to the Vault works however the agent refuses to add the key. Adding an ed25519 key works.

Bildschirm­foto 2022-12-25 um 10 57 04

Steps to Reproduce

  1. Add ed25519-sk SSH Key to keepass
  2. Klick on add to agent
  3. error

Expected Behavior

No error and when ssh-add -l ed25519-sk should show up

Actual Behavior

When ssh-add -l only ed25519 keys show up and no ed25519-sk keys

Context

Installed via brew cask

KeePassXC - 2.7.4 Revision: REVISION

Operating System: macOS 13.1

MCazaly commented 1 year ago

I'm experiencing the same issue with Windows 10's native OpenSSH Agent (OpenSSH_for_Windows_9.1p1, LibreSSL 3.6.1) on version 2.7.4. The key works if I manually save it to a file and then import it with ssh-add.

Note that the agent integration does work for the same ed25519-sk keys on OpenSSH_8.9p1 Ubuntu-3ubuntu0.1, OpenSSL 3.0.2 15 Mar 2022.

jasperweiss commented 1 year ago

The version of openssh shipped with MacOS doesn't support FIDO2 keys yet AFAIK. You'll need to install a more recent version. You can do this with macports: sudo port install openssh +fido2

I did not find a way to get this to work with ssh-agent however. KeePassXC can add the key but once you actually try to use it, it will say agent refused operation. Presumably the system's own ssh-agent is still being used rather than the one installed by macports.

droidmonkey commented 1 year ago

You'll need to set the ssh agent you use either by environment variable or in the application settings. Env var makes things more consistent.