summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-08 00:05:31 +1000
committerDamien Miller <djm@mindrot.org>2000-05-08 00:05:31 +1000
commit58e579bcd987397aeeb5f0a7935ffdfa67125f37 (patch)
tree6b09dedeab72d587eafd53f91a49fcfe27c6ef12 /contrib
parenta3f2a02bc35c5163d435523e764060e92431d6cf (diff)
- Generate DSA host keys during "make key" or RPM installs
Diffstat (limited to 'contrib')
-rw-r--r--contrib/redhat/openssh.spec3
-rw-r--r--contrib/suse/openssh.spec4
2 files changed, 7 insertions, 0 deletions
diff --git a/contrib/redhat/openssh.spec b/contrib/redhat/openssh.spec
index be76c965..96e972cf 100644
--- a/contrib/redhat/openssh.spec
+++ b/contrib/redhat/openssh.spec
@@ -190,6 +190,9 @@ rm -rf $RPM_BUILD_ROOT
if [ ! -f /etc/ssh/ssh_host_key -o ! -s /etc/ssh/ssh_host_key ]; then
/usr/bin/ssh-keygen -b 1024 -f /etc/ssh/ssh_host_key -N '' >&2
fi
+if [ ! -f /etc/ssh/ssh_host_dsa_key -o ! -s /etc/ssh/ssh_host_dsa_key ]; then
+ /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' >&2
+fi
if test -r /var/run/sshd.pid
then
/etc/rc.d/init.d/sshd restart >&2
diff --git a/contrib/suse/openssh.spec b/contrib/suse/openssh.spec
index 7d5d087a..0f63ef65 100644
--- a/contrib/suse/openssh.spec
+++ b/contrib/suse/openssh.spec
@@ -197,6 +197,10 @@ if [ ! -f /etc/ssh/ssh_host_key -o ! -s /etc/ssh/ssh_host_key ]; then
echo "Generating SSH host key..."
/usr/bin/ssh-keygen -b 1024 -f /etc/ssh/ssh_host_key -N '' >&2
fi
+if [ ! -f /etc/ssh/ssh_host_dsa_key -o ! -s /etc/ssh/ssh_host_dsa_key ]; then
+ echo "Generating SSH DSA host key..."
+ /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' >&2
+fi
if test -r /var/run/sshd.pid
then
echo "Restarting the running SSH daemon..."