summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2000-05-15 05:40:27 +0000
committerkris <kris@FreeBSD.org>2000-05-15 05:40:27 +0000
commit866470d7857ac6eddce0c1c9da30adbf44862d82 (patch)
tree69ec8d33de9e8d569a275fe5da24bc87b5113e70 /etc
parent45c7889547651df909ccf05be4ef51b4a7577bb6 (diff)
downloadFreeBSD-src-866470d7857ac6eddce0c1c9da30adbf44862d82.zip
FreeBSD-src-866470d7857ac6eddce0c1c9da30adbf44862d82.tar.gz
Create a DSA host key if one does not already exist, and teach sshd_config
about it.
Diffstat (limited to 'etc')
-rw-r--r--etc/network.subr7
-rw-r--r--etc/rc.d/netoptions7
-rw-r--r--etc/rc.d/network17
-rw-r--r--etc/rc.d/network27
-rw-r--r--etc/rc.d/network37
-rw-r--r--etc/rc.d/routing7
-rw-r--r--etc/rc.network7
7 files changed, 42 insertions, 7 deletions
diff --git a/etc/network.subr b/etc/network.subr
index a03e000..50ab079 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -621,10 +621,15 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_key ]; then
- echo ' creating ssh host key';
+ 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
+ fi
+ ;;
esac
echo '.'
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions
index a03e000..50ab079 100644
--- a/etc/rc.d/netoptions
+++ b/etc/rc.d/netoptions
@@ -621,10 +621,15 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_key ]; then
- echo ' creating ssh host key';
+ 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
+ fi
+ ;;
esac
echo '.'
diff --git a/etc/rc.d/network1 b/etc/rc.d/network1
index a03e000..50ab079 100644
--- a/etc/rc.d/network1
+++ b/etc/rc.d/network1
@@ -621,10 +621,15 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_key ]; then
- echo ' creating ssh host key';
+ 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
+ fi
+ ;;
esac
echo '.'
diff --git a/etc/rc.d/network2 b/etc/rc.d/network2
index a03e000..50ab079 100644
--- a/etc/rc.d/network2
+++ b/etc/rc.d/network2
@@ -621,10 +621,15 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_key ]; then
- echo ' creating ssh host key';
+ 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
+ fi
+ ;;
esac
echo '.'
diff --git a/etc/rc.d/network3 b/etc/rc.d/network3
index a03e000..50ab079 100644
--- a/etc/rc.d/network3
+++ b/etc/rc.d/network3
@@ -621,10 +621,15 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_key ]; then
- echo ' creating ssh host key';
+ 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
+ fi
+ ;;
esac
echo '.'
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index a03e000..50ab079 100644
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -621,10 +621,15 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_key ]; then
- echo ' creating ssh host key';
+ 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
+ fi
+ ;;
esac
echo '.'
diff --git a/etc/rc.network b/etc/rc.network
index a03e000..50ab079 100644
--- a/etc/rc.network
+++ b/etc/rc.network
@@ -621,10 +621,15 @@ network_pass3() {
case ${sshd_enable} in
[Yy][Ee][Ss])
if [ ! -f /etc/ssh/ssh_host_key ]; then
- echo ' creating ssh host key';
+ 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
+ fi
+ ;;
esac
echo '.'
OpenPOWER on IntegriCloud