From d27ccc9b64871b82dc95d124ef73c40b687ece16 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 20 Feb 2011 10:29:52 +0000 Subject: [PATCH] - generate key in checkconfig, so upstart would get new ssh_host_ecdsa_key key on restart Changed files: opensshd.init -> 1.47 --- opensshd.init | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opensshd.init b/opensshd.init index 5a3a4cd..02dbb08 100644 --- a/opensshd.init +++ b/opensshd.init @@ -40,6 +40,7 @@ adjust_oom() { } checkconfig() { + ssh_gen_keys /usr/sbin/sshd -t || exit 1 } @@ -74,7 +75,6 @@ start() { return fi - ssh_gen_keys checkconfig if [ ! -s /etc/ssh/ssh_host_key ]; then @@ -118,7 +118,6 @@ reload() { return fi - ssh_gen_keys checkconfig msg_reloading "OpenSSH" killproc sshd -HUP -- 2.44.0