openssh-server-pam: isn't properly listed as a conflicting package with openssh-server
Problem:
I cannot ssh into a locked account using PAM after uninstalling and reinstalling openssh
.
Any attempt to ssh returns the following error:
<user>@<hostname>: Permission denied (publickey,keyboard-interactive).
I have verified that this behavior can be reproduced on a VM on Alpine 3.13.
How to reproduce:
Install openssh-server-pam
and set the following values on /etc/ssh/sshd_config
:
PasswordAuthentication no
UsePAM yes
Restart sshd
and lock the account to test with passwd -ld <user>
.
After confirming that ssh works, run:
# apk del openssh
# apk add openssh
This causes the problem described above.
How to fix:
Uninstalling and reinstalling openssh-server-pam
fixes this problem:
# apk del openssh-server-pam
# apk add openssh-server-pam
Is there any reason why openssh-server-pam
doesn't depend on openssh
so such a thing can't happen in the first place? Or does openssh-server-pam
have some functionality that is useful without openssh
being installed in the system?