summaryrefslogtreecommitdiff
path: root/obsolete-buildroot/sources/openssh.server.postinst
diff options
context:
space:
mode:
authormbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-07-16 05:43:10 +0000
committermbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-07-16 05:43:10 +0000
commit9feaa112fde3c0306def6676863fe62b78f6a794 (patch)
treefc30346ab513e94fbdbc38c2693801d9514500d4 /obsolete-buildroot/sources/openssh.server.postinst
parent74a795bdb91b6b04297a588f5a4c5c9cfaf8f68a (diff)
openssh patches from below0
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@99 3c298f89-4303-0410-b956-a3cf2f4a3e73
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 0000000000..16d2bf4d76
--- /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
+