summaryrefslogtreecommitdiffstats
path: root/etc/network.subr
diff options
context:
space:
mode:
Diffstat (limited to 'etc/network.subr')
-rw-r--r--etc/network.subr8
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/network.subr b/etc/network.subr
index 3b0771c..a4992f1 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -605,7 +605,13 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
- echo -n ' sshd';
+ if [ ! -f /etc/ssh/ssh_host_key ]; then
+ echo creating ssh host key
+ /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key
+ echo now starting sshd
+ else
+ echo -n ' sshd';
+ fi
${sshd_program:-/usr/sbin/sshd} ${sshd_flags}
;;
esac
OpenPOWER on IntegriCloud