keepassxc icon indicating copy to clipboard operation
keepassxc copied to clipboard

Bitwarden JSON import does not import SSH keys

Open Amunak opened this issue 2 months ago • 2 comments

Have you searched for an existing issue?

  • [x] Yes, I tried searching and reviewed the pinned issues

Brief Summary

Importing a Bitwarden JSON file does not import SSH key "contents" (i.e. the private and public keys), it only imports an empty entry.

Steps to Reproduce

  1. Create an SSH key entry in Bitwarden.
  2. Export the vault as JSON. The file will contain the entry and SSH key data under the JSON key sshKey: {privateKey, publicKey}.
  3. Import the vault in KeePassXC.
  4. Observe that while the entry imported, its contents are all empty (except the name).

Expected Versus Actual Behavior

The SSH key should be imported, or at the very least the user should be warned that it could not have been imported. Potentially for more robustness the user could be warned about any entry that imported without a password, to catch potential similar issues in the future.

The import implementation shouldn't be difficult, as the key is already in PEM format, although I'm not sure if that is always the case.

Amunak avatar Dec 02 '25 12:12 Amunak

Please include the entire json excerpt. This is undocumented.

droidmonkey avatar Dec 02 '25 12:12 droidmonkey

This would be a whole export with a single SSH key entry:

{
  "encrypted": false,
  "folders": [],
  "items": [
    {
      "passwordHistory": [],
      "revisionDate": "2025-12-02T12:47:26.576Z",
      "creationDate": "2025-12-02T12:47:26.576Z",
      "id": "35253688-7d32-4903-a978-b3a700d2c8d6",
      "type": 5,
      "reprompt": 0,
      "name": "Example SSH key",
      "notes": null,
      "favorite": false,
      "fields": [],
      "sshKey": {
        "privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\nQyNTUxOQAAACBUk8mqvJBt/kPwDOqZfMZ4FrhDMI+HNe2pSwYZ0MosbgAAAIhaycE4WsnB\nOAAAAAtzc2gtZWQyNTUxOQAAACBUk8mqvJBt/kPwDOqZfMZ4FrhDMI+HNe2pSwYZ0Mosbg\nAAAEA+ltUexfkfIEwc2iU3chXq40JNgWU5S9MYLis61rqVT1STyaq8kG3+Q/AM6pl8xngW\nuEMwj4c17alLBhnQyixuAAAAAAECAwQF\n-----END OPENSSH PRIVATE KEY-----\n",
        "publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFSTyaq8kG3+Q/AM6pl8xngWuEMwj4c17alLBhnQyixu",
        "keyFingerprint": "SHA256:k1cXY3a8i2B2uvb2nu10Omy/MOd31YFbdhp6griUjC0"
      },
      "collectionIds": null
    }
  ]
}

Amunak avatar Dec 02 '25 12:12 Amunak