Update: new clue from strace
I ran strace on the failing dpkg --configure openssh-server command and found something interesting.
The openssh-server.postinst script reaches the point where it invokes ucf:
execve("/usr/bin/ucf", ...)
The process that actually exits with status 10 is ucf itself:
4651 exit_group(10)
Just before exiting, ucf reads the following from its standard input:
0 failed to open ucf: No such file or directory
That string is
read by ucf; it is not printed by it. It appears to come through the debconf communication channel.
Interestingly, running ucf manually on the same files succeeds:
sudo ucf --debug \
/usr/share/openssh/sshd_config \
/etc/ssh/sshd_config
This completes successfully (exit status 0).
At the same time, I have discovered that several core packages still have missing metadata under /var/lib/dpkg/info, for example:
- apt
- apt-utils
- debconf
- ucf
dpkg -V warns that the file lists for these packages are missing, and there are no corresponding *.list files under /var/lib/dpkg/info.
Given these findings, it now looks less like an openssh-server problem and more like a failure somewhere in the debconf/ucf interaction, possibly related to the missing package metadata.
Does this point to a known failure mode, or suggest the next component that should be investigated?