On Tue, 2019-11-26 at 13:27 +0100, Jouk Jansen wrote:
Hi All,
I'm trying to setup an ssh-server on F31 which logs a user in without
a
password, but with a key-exchange. I generated all the keys and
placed them
in the right locations. It still asks for the password.
Than comes the strange : I stoped the service by "systemctl stop
sshd" and
did run "as root" /usr/sbin/sshd. And than it just worked. (tried to
stop
and start with systemctl again made the passwordless login fail
again)
Question : why does is work with just running "/usr/sbin/sshd" but
not with
"systemctl start sshd" ?
This sounds like an issue with selinux permissions on the authorizied
keys file or path to it. Configure sshd to run in debug mode by setting
LogLevel DEBUG3 in sshd_config, restart the service and retry. The logs
will show up in journal and in /var/log/secure pointing the reason why
your key was rejected.
Regards,
--
Jakub Jelen
Senior Software Engineer
Security Technologies
Red Hat, Inc.