diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/network.subr | 18 | ||||
-rw-r--r-- | etc/rc.d/netoptions | 18 | ||||
-rw-r--r-- | etc/rc.d/network1 | 18 | ||||
-rw-r--r-- | etc/rc.d/network2 | 18 | ||||
-rw-r--r-- | etc/rc.d/network3 | 18 | ||||
-rw-r--r-- | etc/rc.d/routing | 18 | ||||
-rw-r--r-- | etc/rc.network | 18 |
7 files changed, 77 insertions, 49 deletions
diff --git a/etc/network.subr b/etc/network.subr index 59f5370..eabdd0b 100644 --- a/etc/network.subr +++ b/etc/network.subr @@ -847,13 +847,17 @@ network_pass3() { case ${sshd_enable} in [Yy][Ee][Ss]) - if [ ! -f /etc/ssh/ssh_host_key ]; then - echo ' creating ssh RSA host key'; - /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key - fi - if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then - echo ' creating ssh DSA host key'; - /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key + if [ -x /usr/bin/ssh-keygen ]; then + if [ ! -f /etc/ssh/ssh_host_key ]; then + echo ' creating ssh RSA host key'; + /usr/bin/ssh-keygen -trsa1 -N "" \ + -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + echo ' creating ssh DSA host key'; + /usr/bin/ssh-keygen -tdsa -N "" \ + -f /etc/ssh/ssh_host_dsa_key + fi fi ;; esac diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions index 59f5370..eabdd0b 100644 --- a/etc/rc.d/netoptions +++ b/etc/rc.d/netoptions @@ -847,13 +847,17 @@ network_pass3() { case ${sshd_enable} in [Yy][Ee][Ss]) - if [ ! -f /etc/ssh/ssh_host_key ]; then - echo ' creating ssh RSA host key'; - /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key - fi - if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then - echo ' creating ssh DSA host key'; - /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key + if [ -x /usr/bin/ssh-keygen ]; then + if [ ! -f /etc/ssh/ssh_host_key ]; then + echo ' creating ssh RSA host key'; + /usr/bin/ssh-keygen -trsa1 -N "" \ + -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + echo ' creating ssh DSA host key'; + /usr/bin/ssh-keygen -tdsa -N "" \ + -f /etc/ssh/ssh_host_dsa_key + fi fi ;; esac diff --git a/etc/rc.d/network1 b/etc/rc.d/network1 index 59f5370..eabdd0b 100644 --- a/etc/rc.d/network1 +++ b/etc/rc.d/network1 @@ -847,13 +847,17 @@ network_pass3() { case ${sshd_enable} in [Yy][Ee][Ss]) - if [ ! -f /etc/ssh/ssh_host_key ]; then - echo ' creating ssh RSA host key'; - /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key - fi - if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then - echo ' creating ssh DSA host key'; - /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key + if [ -x /usr/bin/ssh-keygen ]; then + if [ ! -f /etc/ssh/ssh_host_key ]; then + echo ' creating ssh RSA host key'; + /usr/bin/ssh-keygen -trsa1 -N "" \ + -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + echo ' creating ssh DSA host key'; + /usr/bin/ssh-keygen -tdsa -N "" \ + -f /etc/ssh/ssh_host_dsa_key + fi fi ;; esac diff --git a/etc/rc.d/network2 b/etc/rc.d/network2 index 59f5370..eabdd0b 100644 --- a/etc/rc.d/network2 +++ b/etc/rc.d/network2 @@ -847,13 +847,17 @@ network_pass3() { case ${sshd_enable} in [Yy][Ee][Ss]) - if [ ! -f /etc/ssh/ssh_host_key ]; then - echo ' creating ssh RSA host key'; - /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key - fi - if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then - echo ' creating ssh DSA host key'; - /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key + if [ -x /usr/bin/ssh-keygen ]; then + if [ ! -f /etc/ssh/ssh_host_key ]; then + echo ' creating ssh RSA host key'; + /usr/bin/ssh-keygen -trsa1 -N "" \ + -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + echo ' creating ssh DSA host key'; + /usr/bin/ssh-keygen -tdsa -N "" \ + -f /etc/ssh/ssh_host_dsa_key + fi fi ;; esac diff --git a/etc/rc.d/network3 b/etc/rc.d/network3 index 59f5370..eabdd0b 100644 --- a/etc/rc.d/network3 +++ b/etc/rc.d/network3 @@ -847,13 +847,17 @@ network_pass3() { case ${sshd_enable} in [Yy][Ee][Ss]) - if [ ! -f /etc/ssh/ssh_host_key ]; then - echo ' creating ssh RSA host key'; - /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key - fi - if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then - echo ' creating ssh DSA host key'; - /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key + if [ -x /usr/bin/ssh-keygen ]; then + if [ ! -f /etc/ssh/ssh_host_key ]; then + echo ' creating ssh RSA host key'; + /usr/bin/ssh-keygen -trsa1 -N "" \ + -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + echo ' creating ssh DSA host key'; + /usr/bin/ssh-keygen -tdsa -N "" \ + -f /etc/ssh/ssh_host_dsa_key + fi fi ;; esac diff --git a/etc/rc.d/routing b/etc/rc.d/routing index 59f5370..eabdd0b 100644 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -847,13 +847,17 @@ network_pass3() { case ${sshd_enable} in [Yy][Ee][Ss]) - if [ ! -f /etc/ssh/ssh_host_key ]; then - echo ' creating ssh RSA host key'; - /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key - fi - if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then - echo ' creating ssh DSA host key'; - /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key + if [ -x /usr/bin/ssh-keygen ]; then + if [ ! -f /etc/ssh/ssh_host_key ]; then + echo ' creating ssh RSA host key'; + /usr/bin/ssh-keygen -trsa1 -N "" \ + -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + echo ' creating ssh DSA host key'; + /usr/bin/ssh-keygen -tdsa -N "" \ + -f /etc/ssh/ssh_host_dsa_key + fi fi ;; esac diff --git a/etc/rc.network b/etc/rc.network index 59f5370..eabdd0b 100644 --- a/etc/rc.network +++ b/etc/rc.network @@ -847,13 +847,17 @@ network_pass3() { case ${sshd_enable} in [Yy][Ee][Ss]) - if [ ! -f /etc/ssh/ssh_host_key ]; then - echo ' creating ssh RSA host key'; - /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key - fi - if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then - echo ' creating ssh DSA host key'; - /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key + if [ -x /usr/bin/ssh-keygen ]; then + if [ ! -f /etc/ssh/ssh_host_key ]; then + echo ' creating ssh RSA host key'; + /usr/bin/ssh-keygen -trsa1 -N "" \ + -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + echo ' creating ssh DSA host key'; + /usr/bin/ssh-keygen -tdsa -N "" \ + -f /etc/ssh/ssh_host_dsa_key + fi fi ;; esac |