diff --git a/root/etc/e-smith/events/actions/sshd-conf b/root/etc/e-smith/events/actions/sshd-conf index cabc34a..3214c8d 100644 --- a/root/etc/e-smith/events/actions/sshd-conf +++ b/root/etc/e-smith/events/actions/sshd-conf @@ -84,14 +84,15 @@ SKIP: { my $db = esmith::ConfigDB->open_ro or die "Could not open config db"; -# Recomment the key in case the SystemName or DomainName changed. -my @change = (-f "/etc/ssh/ssh_host_key") ? ("-c", "-P", "") +for my $typek (qw(dsa rsa ecdsa ed25519)) { + # Recomment the key in case the SystemName or DomainName changed. + my @change = (-f "/etc/ssh/ssh_host_${typek}_key") ? ("-c", "-P", "") : ("-q", "-N", ""); - -esmith::util::backgroundCommand (0, - "/usr/bin/ssh-keygen", @change, "-t", "rsa1", - "-f", "/etc/ssh/ssh_host_key", - "-C", "root@" . $db->get('SystemName')->value . "." . $db->get('DomainName')->value); - + + esmith::util::backgroundCommand (0, + "/usr/bin/ssh-keygen", @change, "-t", "$typek", + "-f", "/etc/ssh/ssh_host_key", + "-C", "root@" . $db->get('SystemName')->value . "." . $db->get('DomainName')->value); +} exit (0); diff --git a/smeserver-openssh.spec b/smeserver-openssh.spec index 744ab02..4936426 100644 --- a/smeserver-openssh.spec +++ b/smeserver-openssh.spec @@ -4,7 +4,7 @@ Summary: smeserver module to configure and enable ssh %define name smeserver-openssh Name: %{name} %define version 11.0.0 -%define release 6 +%define release 7 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -24,6 +24,10 @@ Provides: e-smith-openssh AutoReqProv: no %changelog +* Sat Apr 13 2024 Jean-Philippe Pialasse 11.0.0-7.sme +- fix script to recomment keys [SME: 12612] + now comments rsa, dsa, ecdsa,ed25519. dropped rsa1 + * Fri Apr 12 2024 John Crisp 11.0.0-6.sme - Remove option UsePrivilegeSeparation [SME: 12564]