xca icon indicating copy to clipboard operation
xca copied to clipboard

Not able to import ssh-rsa2 keys in XCA 2.8.0

Open ashish-sharma-stonewain opened this issue 1 year ago • 1 comments

When I try to import the ssh-rsa version 2 key, it says: The key from the file 'D:/usb_id_rsa.pub' is incomplete or inconsistent. However, the same key works properly.

XCA is installed on Windows 11

image

ashish-sharma-stonewain avatar Nov 28 '24 11:11 ashish-sharma-stonewain

Hi @ashish-sharma-stonewain

according to the man-page auf "ssh-keygen"

-m key_format
        ..
        By default OpenSSH will write newly-generated private
        keys in its own format, but when converting public keys for export the default format is “RFC4716”.  Set-
        ting a format of “PEM” when generating or updating a supported private key type will cause the key to be
        stored in the legacy PEM private key format.

if you convert the ssh-rsa key to be in PEM format! (not just the encoding) using e.g. ssh-keygen .. -m PEM then the import of those files will be fine with XCA

this will concert the key-file in-place, so maybe you create a backup first ssh-keygen -p -f <ssh-rsa> -m PEM

creating new ssh-rsa keys in PEM format (-m PEM) will lead to files, that can be directly imported into XCA without error.

HTH

ssh-keygen from openssh-9.6p1, XCA 2.9.0 (docker run ;)

StefanKaerst avatar Sep 02 '25 11:09 StefanKaerst