Score:-1

OpenSSH ignores configuration options PasswordAuthentication and KbdInteractiveAuthentication

in flag

I need to disable SSH password authentication.

I have added the line PasswordAuthentication no to /etc/sshd_config (and copied it 20 times over out of frustration), but after rebooting the machine to make sure everything was reloaded, I am still prompted for a password anyways.

I also need to enable keyboard interactive authentication. Again, adding the appropriate line (KbdInteractiveAuthentication yes) to /etc/sshd_config has no effect.

I have also added the line AuthenticationMethods publickey,keyboard-interactive to /etc/sshd_config; note that I did NOT specify "password" as an authentication method! Still, OpenSSH is requiring a password and not performing keyboard-interactive authentication.

After each change, I ran sudo systemctl sshd reload && sudo systemctl sshd restart, and when that didn't work, I rebooted the machine; still the changes are not being applied.

To make sure that it was using the correct config file, I tried overriding the default (/etc/sshd_config) with itself (see below); I still get the same results even after I execute:

┌──(ragnar@[redacted])-[~]
└─$ sudo sshd -f /etc/ssh/sshd_config
sshd re-exec requires execution with an absolute path
                                                                                                              
┌──(ragnar@[redacted])-[~]
└─$ sudo `which sshd` -f !$

So in addition to trying to provoke me by requiring an absolute path (What a special snowflake you are, OpenSSH), it appears to be simply ignoring certain configuration options.

Is this Agent Smith, or an SSH server? If the latter, is there any way I can get it to behave according to its own specifications, and pay attention to its config file?

Thanks! :)

David avatar
cn flag
What version of Ubuntu and desktop or server?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.