Ssh with publickey not working

I’ve already setup ssh publickey authentication for different Linux-devices (Rocky, Debian, Ubuntu, pfSense, QNAP etc.) but with Fedora 39 it does not work.
Logs show permission denied, but all permissions are set correct.
Of course it works with password-authentication.

Nov 12 14:51:39 localhost sshd[2079]: Could not open user ‘kuchenmann’ authorized keys ‘/home/kuchenmann/.ssh/authorized_keys’: Permission denied
Nov 12 14:51:39 localhost sshd[2079]: Received disconnect from port 52417:11: SSH2 auto-login error: user authentication failed. [preauth]
Nov 12 14:51:39 localhost sshd[2079]: Disconnected from authenticating user kuchenmann port 52417 [preauth]

turned off SElinux and now it works!

This is not a solution!

1 Like

Using restorecon for restoring the default context - CentOS Quick Start Guide [Book]


Unfortunately, SElinux is another big crap in the Linux world.
It does not improve security but obscurity.
Because I could login with my user with password, but was denied with publickey.
So where is the better security?

You are supposed to turn off password authentication.