summaryrefslogtreecommitdiff
path: root/etc/rc.d/netoptions
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>2000-02-28 19:21:05 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>2000-02-28 19:21:05 +0000
commit49923df12d338e50dfa3ff53b0378621d9f48489 (patch)
treeb57d9f6bed4371f98e10928b998df90b674059fa /etc/rc.d/netoptions
parent079654e8e26629b20751fea5ab21e707996035b5 (diff)
downloadsrc-test2-49923df12d338e50dfa3ff53b0378621d9f48489.tar.gz
src-test2-49923df12d338e50dfa3ff53b0378621d9f48489.zip
Notes
Diffstat (limited to 'etc/rc.d/netoptions')
-rw-r--r--etc/rc.d/netoptions8
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions
index 3b0771ce4b87..a4992f189187 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