openssh-server: use ssh-keygen -A to replace the systemd helper script.

This commit is contained in:
Juan RP 2011-10-12 14:33:18 +02:00
parent 7f47f9fa89
commit 895c12e522
4 changed files with 3 additions and 25 deletions

View file

@ -1,16 +0,0 @@
#!/bin/sh
if [ ! -e /etc/ssh/ssh_host_key ]; then
/usr/bin/ssh-keygen -t rsa1 -b 4096 -f /etc/ssh/ssh_host_key -N ''
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
/usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N ''
fi
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
/usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
fi
if [ ! -f /etc/ssh/ssh_host_ecdsa_key ]; then
/usr/bin/ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ''
fi
exit 0

View file

@ -1,12 +1,9 @@
[Unit]
Description=OpenSSH server Key Generation
ConditionPathExists=|!/etc/ssh/ssh_host_key
ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key
ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key
ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key
[Service]
ExecStart=/lib/systemd/scripts/sshdgenkeys
Type=oneshot
ExecStart=/usr/bin/ssh-keygen -A
RemainAfterExit=yes
[Install]

View file

@ -5,7 +5,7 @@ long_desc="${long_desc}
This package contains the ${pkgname} server files."
revision=1
revision=2
conf_files="/etc/ssh/sshd_config /etc/pam.d/sshd"
systemd_services="sshd.service sshdgenkeys.service"
@ -31,7 +31,5 @@ do_install()
vmove etc/pam.d etc
vinstall ${FILESDIR}/sshd.service 644 lib/systemd/system
vinstall ${FILESDIR}/sshdgenkeys.service 644 lib/systemd/system
vinstall ${FILESDIR}/sshdgenkeys.scripts 755 \
lib/systemd/scripts sshdgenkeys
vinstall ${FILESDIR}/sshd.tmpfiles.d 644 usr/lib/tmpfiles.d sshd.conf
}

View file

@ -50,7 +50,6 @@ post_install()
vinstall contrib/findssl.sh 755 usr/bin findssl
vinstall contrib/ssh-copy-id 755 usr/bin
vinstall contrib/ssh-copy-id.1 644 usr/share/man/man1
vinstall ${FILESDIR}/sshd.rc 755 etc/init.d sshd
vinstall LICENCE 644 usr/share/licenses/${pkgname}
sed -i \