Skip to content

SSH key pair cannot be imported when private key line width is not 70 characters #14076

@dasyad00

Description

@dasyad00

Steps To Reproduce

I noticed this when trying to import an SSH key pair (ED25519) generated from the AWS console, but the bug can be replicated fully locally. SSH private keys generated from the AWS console have 64 characters per line, while Bitwarden key import only supports when each row has exactly 70 characters.

  1. In the Bitwarden desktop client, create an SSH key.
  2. Copy the private key to a text editor.
  3. Remove line break(s) (line 1 should now have 140 characters).
  4. Copy the contents of the text editor to the clipboard.
  5. Press + on the SSH keys and press "Import key from clipboard"

Expected Result

Confirmation message "SSH key imported successfully" shown.

Actual Result

Error message "The SSH key is invalid" shown.

Screenshots or Videos

No response

Additional Context

No response

Operating System

Linux

Operating System Version

No response

Installation method

Other

Build Version

2025.2.0

Issue Tracking Info

  • I understand that work is tracked outside of GitHub. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions