How can import private key and certificate to seahorse in Ubuntu 18.04

I'm trying to import a certificate into seahorse/gnome-keyring on Ubuntu 18.04, but the seahorse gui application won't let me, the 'import' button is greyed out:

Screenshot

enter image description here

As seen in the screenshot, mouse hovering the "import" button shows the message "Cannot import because there are no compatible importers".

How can I fix it to be able to import certificates and keys to seahorse?

Because that problem, I'm currently unable to digitally sign documents with LibreOffice.

This problem doesn't occur on Ubuntu 16.04 LTS, as I've just tested on my wife's laptop, it happens only in my Laptop with Ubuntu 18.04 LTS.

Thanks.


Solution 1:

I had exactly the same problem importing my SSH private key to Seahorse in Ubuntu 18.04.

Apparently it also needs the pubkey in the same directory. If you don't have it, you can generate it using your private key:

ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub

It will import it automatically the first time you use your key.