aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2000-05-15 05:40:27 +0000
committerKris Kennaway <kris@FreeBSD.org>2000-05-15 05:40:27 +0000
commit0c11f6e1878bcea7a9092510f4ccf9d4ee93c3d7 (patch)
treecb46580f3616be67bd785a4e0cb8dd4059068c83
parent4fc935441942f9cbe1d28342842fdfeded2e4439 (diff)
downloadsrc-0c11f6e1878bcea7a9092510f4ccf9d4ee93c3d7.tar.gz
src-0c11f6e1878bcea7a9092510f4ccf9d4ee93c3d7.zip
Create a DSA host key if one does not already exist, and teach sshd_config
about it.
Notes
Notes: svn path=/head/; revision=60578
-rw-r--r--crypto/openssh/sshd_config1
-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
8 files changed, 43 insertions, 7 deletions
diff --git a/crypto/openssh/sshd_config b/crypto/openssh/sshd_config
index 4596cb8bc4c5..c17868af3181 100644
--- a/crypto/openssh/sshd_config
+++ b/crypto/openssh/sshd_config
@@ -7,6 +7,7 @@ Port 22
#ListenAddress 0.0.0.0
#ListenAddress ::
HostKey /etc/ssh/ssh_host_key
+HostKey /etc/ssh/ssh_dsa_host_key
ServerKeyBits 768
LoginGraceTime 60
KeyRegenerationInterval 3600
diff --git a/etc/network.subr b/etc/network.subr
index a03e0002549a..50ab079fe0fe 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 a03e0002549a..50ab079fe0fe 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 a03e0002549a..50ab079fe0fe 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 a03e0002549a..50ab079fe0fe 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 a03e0002549a..50ab079fe0fe 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 a03e0002549a..50ab079fe0fe 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 a03e0002549a..50ab079fe0fe 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 '.'