I’m having a problem with SSH. I can’t seem to successfully establish a connection to the IPFire server from a client using a public key. The console message is as follows: ‘root@ipfire.localdomain: Permission denied (publickey).’ The same thing happens with the libvirt user.
Can someone help me step by step?
Is this an ssh connection that used to work but now doesn’t or is this a problem trying to get the ssh connection working in the first place?
yes this is a connection that used to work, but I reinstalled ipfire and this is set in the GUI
If it was a re-install then your ssh host keys will have been newly created and there won’t be an authorized_keys file.
So either you need to do a restore from your backup to get the old ssh host keys and the authorized_keys file with the previous client public key or you need to copy the client public key onto your IPFire again and append it to the authorized_keys file as per the documentation.
https://www.ipfire.org/docs/configuration/system/ssh#ssh-host-keys
Oh, thanks, I had already restored a backup, which helped me a bit with the IPfire configuration.
I’ve also already followed the link you provided. What can I say? I’ve been messing around with it for two days now, and only now did I notice that I have to enable ‘Allow password-based authentication’ in the GUI, at least until the ‘ssh-copy-id …’ of the respective users has been executed. Now it works, so it can be considered solved, but thanks anyway.