aboutsummaryrefslogtreecommitdiff
path: root/etc/rc.network
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2002-04-10 22:30:54 +0000
committerPeter Wemm <peter@FreeBSD.org>2002-04-10 22:30:54 +0000
commit6636027fe4bd94f6f387387acfeebea1ca560154 (patch)
treeced5160c4d78e9d3c64abbca5af942f3228e0ae2 /etc/rc.network
parent898568d8abf87f3e37f154641dd9c88f7aed2706 (diff)
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.
Notes
Notes: svn path=/head/; revision=94391
Diffstat (limited to 'etc/rc.network')
-rw-r--r--etc/rc.network13
1 files changed, 9 insertions, 4 deletions
diff --git a/etc/rc.network b/etc/rc.network
index 8d779eaac991..d7e8bca3a559 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