summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/network3
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.d/network3')
-rw-r--r--etc/rc.d/network318
1 files changed, 11 insertions, 7 deletions
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
OpenPOWER on IntegriCloud