mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 04:33:00 +02:00
This change addresses a problem accessing Infix over SSH. The root cause turned out to be the hostkeys, which live in /var/lib/ssh and not in /etc on Infix, were corrupt. The corruption was interesting in that they all existed, but had size 0. This state was not caught by our ssh-genhostkeys script and that is what this change attempts to fix. As before this change, the script starts by calling `sshd -t` to verify they hostkeys. Unlike before we now check for 'invalid format' in the output of that command. If any file with invalid format is found, we remove them and regenerate the hostkeys. In this investigation it was found that the 'ssh-keygen -A' command that generates hostkeys does not use the directories specified for the given files in sshd_config, instead it always saves the files to /etc/ssh. Also, since there is no panic in getting the hostkeys generated we can allow the script to wait for syslogd to start before we run, even though it all happens in runlevel S. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>