summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-04-10 22:30:54 +0000
committerpeter <peter@FreeBSD.org>2002-04-10 22:30:54 +0000
commit32ba147180b7737071e6559bbb2c3094e213291a (patch)
treeced5160c4d78e9d3c64abbca5af942f3228e0ae2 /etc
parentc7389be7ba51f5065993f0bb1468a0b1455f745f (diff)
downloadFreeBSD-src-32ba147180b7737071e6559bbb2c3094e213291a.zip
FreeBSD-src-32ba147180b7737071e6559bbb2c3094e213291a.tar.gz
Since sshd expects /etc/ssh/ssh_host_rsa_key to exist, we had better
create it. Also specify protocol v1/v2 in case people wonder why we generate two RSA keys.
Diffstat (limited to 'etc')
-rw-r--r--etc/network.subr13
-rw-r--r--etc/rc.d/netoptions13
-rw-r--r--etc/rc.d/network113
-rw-r--r--etc/rc.d/network213
-rw-r--r--etc/rc.d/network313
-rw-r--r--etc/rc.d/routing13
-rw-r--r--etc/rc.network13
7 files changed, 63 insertions, 28 deletions
diff --git a/etc/network.subr b/etc/network.subr
index 8d779ea..d7e8bca 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -853,15 +853,20 @@ network_pass3() {
[Yy][Ee][Ss])
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 "" \
+ echo ' creating ssh protocol v1 RSA host key';
+ /usr/bin/ssh-keygen -t rsa1 -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 "" \
+ echo ' creating ssh protocol v2 DSA host key';
+ /usr/bin/ssh-keygen -t dsa -N "" \
-f /etc/ssh/ssh_host_dsa_key
fi
+ if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
+ echo ' creating ssh protocol v2 RSA host key';
+ /usr/bin/ssh-keygen -t rsa -N "" \
+ -f /etc/ssh/ssh_host_rsa_key
+ fi
fi
;;
esac
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions
index 8d779ea..d7e8bca 100644
--- a/etc/rc.d/netoptions
+++ b/etc/rc.d/netoptions
@@ -853,15 +853,20 @@ network_pass3() {
[Yy][Ee][Ss])
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 "" \
+ echo ' creating ssh protocol v1 RSA host key';
+ /usr/bin/ssh-keygen -t rsa1 -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 "" \
+ echo ' creating ssh protocol v2 DSA host key';
+ /usr/bin/ssh-keygen -t dsa -N "" \
-f /etc/ssh/ssh_host_dsa_key
fi
+ if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
+ echo ' creating ssh protocol v2 RSA host key';
+ /usr/bin/ssh-keygen -t rsa -N "" \
+ -f /etc/ssh/ssh_host_rsa_key
+ fi
fi
;;
esac
diff --git a/etc/rc.d/network1 b/etc/rc.d/network1
index 8d779ea..d7e8bca 100644
--- a/etc/rc.d/network1
+++ b/etc/rc.d/network1
@@ -853,15 +853,20 @@ network_pass3() {
[Yy][Ee][Ss])
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 "" \
+ echo ' creating ssh protocol v1 RSA host key';
+ /usr/bin/ssh-keygen -t rsa1 -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 "" \
+ echo ' creating ssh protocol v2 DSA host key';
+ /usr/bin/ssh-keygen -t dsa -N "" \
-f /etc/ssh/ssh_host_dsa_key
fi
+ if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
+ echo ' creating ssh protocol v2 RSA host key';
+ /usr/bin/ssh-keygen -t rsa -N "" \
+ -f /etc/ssh/ssh_host_rsa_key
+ fi
fi
;;
esac
diff --git a/etc/rc.d/network2 b/etc/rc.d/network2
index 8d779ea..d7e8bca 100644
--- a/etc/rc.d/network2
+++ b/etc/rc.d/network2
@@ -853,15 +853,20 @@ network_pass3() {
[Yy][Ee][Ss])
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 "" \
+ echo ' creating ssh protocol v1 RSA host key';
+ /usr/bin/ssh-keygen -t rsa1 -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 "" \
+ echo ' creating ssh protocol v2 DSA host key';
+ /usr/bin/ssh-keygen -t dsa -N "" \
-f /etc/ssh/ssh_host_dsa_key
fi
+ if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
+ echo ' creating ssh protocol v2 RSA host key';
+ /usr/bin/ssh-keygen -t rsa -N "" \
+ -f /etc/ssh/ssh_host_rsa_key
+ fi
fi
;;
esac
diff --git a/etc/rc.d/network3 b/etc/rc.d/network3
index 8d779ea..d7e8bca 100644
--- a/etc/rc.d/network3
+++ b/etc/rc.d/network3
@@ -853,15 +853,20 @@ network_pass3() {
[Yy][Ee][Ss])
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 "" \
+ echo ' creating ssh protocol v1 RSA host key';
+ /usr/bin/ssh-keygen -t rsa1 -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 "" \
+ echo ' creating ssh protocol v2 DSA host key';
+ /usr/bin/ssh-keygen -t dsa -N "" \
-f /etc/ssh/ssh_host_dsa_key
fi
+ if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
+ echo ' creating ssh protocol v2 RSA host key';
+ /usr/bin/ssh-keygen -t rsa -N "" \
+ -f /etc/ssh/ssh_host_rsa_key
+ fi
fi
;;
esac
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index 8d779ea..d7e8bca 100644
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -853,15 +853,20 @@ network_pass3() {
[Yy][Ee][Ss])
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 "" \
+ echo ' creating ssh protocol v1 RSA host key';
+ /usr/bin/ssh-keygen -t rsa1 -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 "" \
+ echo ' creating ssh protocol v2 DSA host key';
+ /usr/bin/ssh-keygen -t dsa -N "" \
-f /etc/ssh/ssh_host_dsa_key
fi
+ if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
+ echo ' creating ssh protocol v2 RSA host key';
+ /usr/bin/ssh-keygen -t rsa -N "" \
+ -f /etc/ssh/ssh_host_rsa_key
+ fi
fi
;;
esac
diff --git a/etc/rc.network b/etc/rc.network
index 8d779ea..d7e8bca 100644
--- a/etc/rc.network
+++ b/etc/rc.network
@@ -853,15 +853,20 @@ network_pass3() {
[Yy][Ee][Ss])
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 "" \
+ echo ' creating ssh protocol v1 RSA host key';
+ /usr/bin/ssh-keygen -t rsa1 -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 "" \
+ echo ' creating ssh protocol v2 DSA host key';
+ /usr/bin/ssh-keygen -t dsa -N "" \
-f /etc/ssh/ssh_host_dsa_key
fi
+ if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
+ echo ' creating ssh protocol v2 RSA host key';
+ /usr/bin/ssh-keygen -t rsa -N "" \
+ -f /etc/ssh/ssh_host_rsa_key
+ fi
fi
;;
esac
OpenPOWER on IntegriCloud