openssh-server-pam: isn't properly listed as a conflicting package with openssh-server
I cannot ssh into a locked account using PAM after uninstalling and reinstalling
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:
openssh-server-pam and set the following values on
PasswordAuthentication no UsePAM yes
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?