Skip to content

Commit

Permalink
regenrate ssh_host keys if non are available
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lange committed Sep 28, 2016
1 parent b6de118 commit 8bf83c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/simple/files/etc/rc.local/CLOUD
@@ -0,0 +1,7 @@
#! /bin/bash

# regenerate ssh_host keys
ls /etc/ssh/ssh_host_* > /dev/null
if [ $? -ne 0 ]; then
dpkg-reconfigure -fnoninteractive openssh-server
fi
5 changes: 5 additions & 0 deletions examples/simple/files/etc/rc.local/FAISERVER
Expand Up @@ -11,6 +11,11 @@ set -o pipefail

# setup network
ifup eth0
# regenerate ssh_host keys
ls /etc/ssh/ssh_host_* > /dev/null
if [ $? -ne 0 ]; then
dpkg-reconfigure -fnoninteractive openssh-server
fi
sleep 8
[ -x /etc/init.d/nscd ] && /etc/init.d/nscd restart

Expand Down

0 comments on commit 8bf83c9

Please sign in to comment.