1

I'm running Fedora 36 Workstation with OpenSSH server 8.8p1. I want to log on a single remote user and authenticate with their password, but OpenSSH seems determined not to let me. I've tried every solution I can find online. Most of them seem to come down to "edit the password authentication line in /etc/ssh/sshd_config so that it reads as follows:

PasswordAuthentication yes

Done. I've also set the following:

PubkeyAuthentication no

KerberosAuthentication no

GSSAPIAuthentication no

I've tried connecting from Putty on Windows and through the terminal on another Fedora 36 Workstation. No luck. Same errors. I tried setting up keys, and I couldn't ssh-copy-id to the server because I haven't been able to authenticate a user yet.

At this point, my login attempt looks like this:

ssh -vv [email protected]

and always spits back

[email protected]: Permission denied (gssapi-keyex,gssapi-with-mic).

In the debug log, I also see

Authentications that can continue: gssapi-keyex,gssapi-with-mic

I'm sure I've restarted sshd. I'm sure that I'm editing the correct config file on the server. I've also tried to ssh with options set on the client side:

ssh -o [relevant options, etc.]

Why, if password authentication is set to yes, is it not showing up as an authentication method that can continue? Why, if GSSAPI is set to no, are those options showing as available? I've also tried removing openssh-server from the server and cleared out all ssh config files, then reinstalled and reset the options.

What else can I try?

I've seen references to UsePAM and ChallengeResponseAuthentication, but I've tried every combination of values for those, as well, and I keep ending up in the same place. The fact that I'm getting the same errors on both clients says that it's something on the server. Is there something that could be overriding my config file?

6
  • 1
    You say you tried setting up keys but couldn't, since you haven't been able to authenticate a user yet. How did you change the sshd config? Commented Nov 16, 2022 at 3:41
  • 1
    are you doing changes in client side or server side? it seems you are doing client side only can you confirm? Commented Nov 16, 2022 at 4:13
  • 1
    If Fedora is like RHEL it may be setting options/features in the sshd start-up command line that override settings form /etc/ssh/sshd_config ; check those commandline arguments with for example systemctl status sshd and/or the contents EnvironmentFile referenced in the systemd sshd.service unit file Commented Nov 17, 2022 at 13:09
  • @asktyagi I am making the changes on the server. Commented Nov 17, 2022 at 15:35
  • @jabbson I edited /etc/ssh/sshd_config with sudo vi /etc/ssh/sshd_config Commented Nov 17, 2022 at 15:36

1 Answer 1

2

Turns out there was a local config file I had missed. Thanks to @diya's comment above, I went looking for another conf file.

/etc/ssh/sshd_config.d/01-local.conf

It contained one line

PasswordAuthentication no

Changed this to yes, restarted sshd, had immediate success logging in from the client.

I'm glad it's working, but I would still be interested to know if anyone has any insight into why this extra config file was tucked away, overriding my sshd_config. I didn't see any reference to this in any of the troubleshooting materials I found on ssh login issues.

3
  • 1
    It is probably included from /etc/ssh/sshd_config by Include /etc/ssh/sshd_config.d/*.conf (or something similar), likely close to the top of the file. Commented Nov 17, 2022 at 19:35
  • Thankyou! Above solution worked. I was finding the solution since last 2 days Commented Jan 20, 2024 at 6:19
  • I had this same issue for an AWS EC2 instance. It ended up that /etc/ssh/sshd_config.d folder had a 60-cloudimg-settings.conf file containing just one line/setting: 'PasswordAuthentication no'. Changed it to 'yes' and it worked. Commented May 16, 2024 at 16:29

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.