From 53a57e871398b92549a12fff473b5a68d5321833 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sun, 10 May 2015 13:50:49 -0400 Subject: [PATCH] Have simple-init regenerate ssh keys on boot If the keys aren't there on boot, we want to generate them. Change-Id: I84d185887007d501306fe22731dd073e62fdfe36 --- elements/simple-init/install.d/simple-init.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elements/simple-init/install.d/simple-init.sh b/elements/simple-init/install.d/simple-init.sh index 52686f0d..cceae2a6 100755 --- a/elements/simple-init/install.d/simple-init.sh +++ b/elements/simple-init/install.d/simple-init.sh @@ -41,6 +41,9 @@ if blkid -t LABEL="config-2" ; then /usr/local/bin/glean --ssh --skip-network fi +if [ -f /usr/bin/dpkg ] ; then + test -f /etc/ssh/ssh_host_rsa_key || dpkg-reconfigure openssh-server +fi if [ -n "$INTERFACE" ]; then /usr/local/bin/glean --interface $INTERFACE