* Sat Apr 13 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-7.sme

- fix script to recomment keys [SME: 12612]
  now comments rsa, dsa, ecdsa,ed25519. dropped rsa1
This commit is contained in:
Jean-Philippe Pialasse 2024-04-13 00:09:44 -04:00
parent 0d6a3cc276
commit eb410e3e74
2 changed files with 14 additions and 9 deletions

View File

@ -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);

View File

@ -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 <jpp@koozali.org> 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 <jcrisp@safeandsoundit.co.uk> 11.0.0-6.sme
- Remove option UsePrivilegeSeparation [SME: 12564]