diff options
Diffstat (limited to 'etc/rc.d')
-rw-r--r-- | etc/rc.d/netoptions | 8 | ||||
-rw-r--r-- | etc/rc.d/network1 | 8 | ||||
-rw-r--r-- | etc/rc.d/network2 | 8 | ||||
-rw-r--r-- | etc/rc.d/network3 | 8 | ||||
-rw-r--r-- | etc/rc.d/routing | 8 |
5 files changed, 35 insertions, 5 deletions
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions index 3b0771c..a4992f1 100644 --- a/etc/rc.d/netoptions +++ b/etc/rc.d/netoptions @@ -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 diff --git a/etc/rc.d/network1 b/etc/rc.d/network1 index 3b0771c..a4992f1 100644 --- a/etc/rc.d/network1 +++ b/etc/rc.d/network1 @@ -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 diff --git a/etc/rc.d/network2 b/etc/rc.d/network2 index 3b0771c..a4992f1 100644 --- a/etc/rc.d/network2 +++ b/etc/rc.d/network2 @@ -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 diff --git a/etc/rc.d/network3 b/etc/rc.d/network3 index 3b0771c..a4992f1 100644 --- a/etc/rc.d/network3 +++ b/etc/rc.d/network3 @@ -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 diff --git a/etc/rc.d/routing b/etc/rc.d/routing index 3b0771c..a4992f1 100644 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -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 |