summaryrefslogtreecommitdiffstats
path: root/obsolete-buildroot/sources/openssh.server.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'obsolete-buildroot/sources/openssh.server.postinst')
-rw-r--r--obsolete-buildroot/sources/openssh.server.postinst20
1 files changed, 20 insertions, 0 deletions
diff --git a/obsolete-buildroot/sources/openssh.server.postinst b/obsolete-buildroot/sources/openssh.server.postinst
new file mode 100644
index 000000000..16d2bf4d7
--- /dev/null
+++ b/obsolete-buildroot/sources/openssh.server.postinst
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# Check for the SSH1 RSA key
+if [ ! -f /etc/ssh_host_key ] ; then
+ echo Generating RSA Key...
+ /usr/bin/ssh-keygen -t rsa1 -f /etc/ssh_host_key -C '' -N ''
+fi
+
+# Check for the SSH2 RSA key
+if [ ! -f /etc/ssh_host_rsa_key ] ; then
+ echo Generating RSA Key...
+ /usr/bin/ssh-keygen -t rsa -f /etc/ssh_host_rsa_key -C '' -N ''
+fi
+
+# Check for the SSH2 DSA key
+if [ ! -f /etc/ssh_host_dsa_key ] ; then
+ echo "Generating DSA Key... (Takes a few minutes)"
+ /usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key -C '' -N ''
+fi
+