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

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

Open
1 task done
dasyad00 opened this issue Apr 1, 2025 · 3 comments
Open
1 task done
Labels
bug desktop Desktop Application

Comments

@dasyad00
Copy link

dasyad00 commented Apr 1, 2025

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.
@dasyad00 dasyad00 added bug desktop Desktop Application labels Apr 1, 2025
@S-Kakar
Copy link

S-Kakar commented Apr 1, 2025

Thank you for reporting this issue! We've added this to our internal tracking system.
ID: PM-19766

@cbw23
Copy link

cbw23 commented Apr 6, 2025

Hi there,

I am unable to reproduce this issue, it has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

@dasyad00
Copy link
Author

dasyad00 commented Apr 8, 2025

I have recently updated to 2025.3.0 and it is still reproducible for me. Here is a sample private key generated by Bitwarden:

-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACBjI8St2g5djrkuY7EVPreVZA7S6hmiy9y+oQfp8Aio/AAAAIgfE0+UHxNP
lAAAAAtzc2gtZWQyNTUxOQAAACBjI8St2g5djrkuY7EVPreVZA7S6hmiy9y+oQfp8Aio/A
AAAEAOU2i46+f+cDTSQ5uxWdD393nhioo8NSTO0ODjoqkQw2MjxK3aDl2OuS5jsRU+t5Vk
DtLqGaLL3L6hB+nwCKj8AAAAAAECAwQF
-----END OPENSSH PRIVATE KEY-----

And here is the same key with a different line width of 64 (instead of 70):

-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAA
AAtzc2gtZWQyNTUxOQAAACBjI8St2g5djrkuY7EVPreVZA7S6hmiy9y+oQfp
8Aio/AAAAIgfE0+UHxNPlAAAAAtzc2gtZWQyNTUxOQAAACBjI8St2g5djrku
Y7EVPreVZA7S6hmiy9y+oQfp8Aio/AAAAEAOU2i46+f+cDTSQ5uxWdD393nh
ioo8NSTO0ODjoqkQw2MjxK3aDl2OuS5jsRU+t5VkDtLqGaLL3L6hB+nwCKj8
AAAAAAECAwQF
-----END OPENSSH PRIVATE KEY-----

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

No branches or pull requests

3 participants