2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-11-28 21:32:22 +00:00

Tolerate missing DSA host keys when initializing ssh

Newer OpenSSH no longer generates DSA host keys, so ssh-keygen -A
leaves none behind and the unconditional rm printed an error during
genesis boot and el8 installs.
This commit is contained in:
Markus Hilger
2026-11-19 23:07:54 +01:00
parent 5c9bbf0da5
commit 4848ef3c15
2 changed files with 2 additions and 2 deletions
@@ -82,7 +82,7 @@ if [ ! -z "$blargs" ]; then
echo "bootloader $blargs" > /tmp/grubpw
fi
ssh-keygen -A
rm /etc/ssh/ssh_host_dsa_key*
rm -f /etc/ssh/ssh_host_dsa_key*
for pubkey in /etc/ssh/ssh_host*key.pub; do
certfile=${pubkey/.pub/-cert.pub}
curl -sf -X POST -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $(cat /etc/confluent/confluent.apikey)" -d @$pubkey https://$confluent_mgr/confluent-api/self/sshcert > $certfile
@@ -239,7 +239,7 @@ echo search $dnsdomain >> /etc/resolv.conf
echo -n "Initializing ssh..."
ssh-keygen -A
mkdir -p /usr/share/empty.sshd
rm /etc/ssh/ssh_host_dsa_key*
rm -f /etc/ssh/ssh_host_dsa_key*
for pubkey in /etc/ssh/ssh_host*key.pub; do
certfile=${pubkey/.pub/-cert.pub}
privfile=${pubkey%.pub}