summaryrefslogtreecommitdiffstats
path: root/etc/rc.network
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/rc.network
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/rc.network')
-rw-r--r--etc/rc.network7
1 files changed, 6 insertions, 1 deletions
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