We're having problems connecting to a server using a password over SSH. What makes the situation strange is that I see contradictory authentication methods available:
$ ssh -v user@example.com -o PreferredAuthentications=password
OpenSSH_7.9p1, OpenSSL 1.1.1a 20 Nov 2018
debug1: Connecting to example.com [1.2.3.4] port 22.
debug1: Connection established.
debug1: Local version string SSH-2.0-OpenSSH_7.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
[...]
debug1: Authentications that can continue: publickey,password <<< HERE
debug1: Next authentication method: password
user@example.com's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
user@example.com's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
user@example.com's password:
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
user@example.com: Permission denied (publickey). <<< HERE
My understanding is that the two marked lines should show matching authentication methods, so either
debug1: Authentications that can continue: publickey
[...]
user@example.com: Permission denied (publickey).
or
debug1: Authentications that can continue: publickey,password
[...]
user@example.com: Permission denied (publickey,password).
See for example other logs with matching authentication methods here, here, and here.
Is this a sign that something is wrong, or a harmless variation?
Edit:
1: I'm not looking for help on how to setup the authentication methods on sshd_config, this has already been done.
2: This is probably not caused by entering a wrong password, because I just tested on a personal server and the methods still match:
$ ssh -v boppreh@boppreh.com -o PreferredAuthentications=password
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password <<< HERE
debug1: Next authentication method: password
boppreh@boppreh.com's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
boppreh@boppreh.com's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
boppreh@boppreh.com's password:
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
boppreh@boppreh.com: Permission denied (publickey,password). <<< HERE
3: It's also not an incorrect username, or the -o PreferredAuthentications=password
flag, my personal server still replies with Permission denied (publickey,password).
on those scenarios.