Can't import any ssh private keys?

So I made the switch from windows to the latest manjaro KDE but I can’t for the life of me figure out how to import/manage/use my remote server ssh keys.

On windows I would convert pem private keys to ppk files with puttygen.exe and manage them in pageant.exe, which is the default keyring that comes with putty on windows.

Manjaro seems to point me towards seahorse but seahorse won’t let me import any of my old pem keys. If I go to seahorse > import from file > select the ssh key pem file Seahorse will display information about key but the actual import button is grayed out?


The “pem” keys I’m try to import/use are just the normal ssh keys that AWS EC2 spits out when spinning up a new server instance. So the file content of these keys just looks like this…

-----BEGIN RSA PRIVATE KEY-----
<redacted>
-----END RSA PRIVATE KEY-----

I’m kind of pulling my hair out on this one, I’ve done a bunch of googling about this issue and I asked in the Manjaoro matrix rooms but I haven’t coming up with any solution so far.

Until I figure this out I keep having to boot back into my old windows OS just to be able to work. :grimacing:

1 Like

Welcome to Linux!

ssh USER@HOST -i ~/.ssh/KEYFILE

where KEYFILE is just that file that begins with “-------- BEGIN RSA PRIVATE KEY ------”

For some more in depth knowledge google for ssh, or use man ssh in the terminal. SSH is integral to linux so there is no putty or such thing. Its a command prompt program configured like all others with configuration file(s)

For connections often used I suggest that

e.g. for a server called server1.mydomain.com I would have a file called “id_rsa_priv-server01” inside of ~/.ssh/ containing

-----BEGIN RSA PRIVATE KEY-----
<redacted>
-----END RSA PRIVATE KEY-----

than according to that one server I would add to the “config” file inside of .ssh the following snippet:

host	server1 	server1.mydomain.com
	HostName	        IP.ADDRESS.OF.THE.SERVER
	Port		        PORT_SSH_LISTENS_TO (commonly 22)
	User		        USER_ON_THE_REMOTE_MACHINE
	IdentityFile	    ~/.ssh/id_rsa_priv-server01
	AddressFamily   	inet

so with this config I now can connect to the server issuing ssh server1 in the terminal. Otherwise I would have to specivy the key-file every time I connect.

2 Likes

Thanks for the help @Th3Z0ne, that got me up and running. :partying_face:

I feel a bit silly since I’ve done that many times on remote linux servers via ssh but somehow I didn’t think about ~/.ssh/ on a DE.


That said, I was hoping for a more GUI based solution for key management/generation on a DE.

The keys still don’t show in seahorse after configuring things in ~/.ssh/. Is there some other keyring GUI I should look at instead?

I am quite certain that seahorse does not, and is not indended to manage keys for SSH; But please do not take that as true - I am not certain as stated.

Seahorse is a GUI for gnome-keyring, so you’d need to install and configure that, however since you’re on KDE, kwallet may be a better choice but I’m not sure if it does what you want or even if it has a gui.

https://wiki.archlinux.org/title/KDE_Wallet
https://wiki.archlinux.org/title/GNOME/Keyring

https://wiki.archlinux.org/title/SSH_keys#SSH_agents

https://wiki.archlinux.org/title/List_of_Applications#Encryption,_signing,_steganography

https://wiki.archlinux.org/title/List_of_Applications#Password_managers

Just found muon (formally snowflake, also the name of a db hence the name change), which is a GUI SSH client with the ability to manage keys. No idea what it’s like though. There’s an orphaned package in the AUR under snowflake. :man_shrugging:

@Th3Z0ne It seems it is, according to:
https://wiki.gnome.org/Apps/Seahorse

1 Like

You don’ t need no gui for ssh-keys.
You may use a ssh-agent, and then just type ssh-add ~/.ssh/the-name-of-the-keyfile in console (then the key is unlocked and directly useable until you log out)

https://wiki.archlinux.org/title/OpenSSH

ssh-keys count as “imported” when they are located at ~/.ssh/keyfile-name
ssh will find them and use them

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.