Not able to import ssh-rsa2 keys in XCA 2.8.0
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
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 ;)