summaryrefslogtreecommitdiffstats
path: root/openwrt/package/openssh/files/S50sshd
diff options
context:
space:
mode:
authorwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-06-07 07:04:44 +0000
committerwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-06-07 07:04:44 +0000
commit14d0f66cd28d2535a4c472f9df8c75acdc99f08a (patch)
tree48a19e3842fd69e920ba6ad1e53b2b6cb784f072 /openwrt/package/openssh/files/S50sshd
parent845d7ab06091e2a604273230a384008c45700ddb (diff)
add openssh package, sshd does not work. why?
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1165 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/openssh/files/S50sshd')
-rwxr-xr-xopenwrt/package/openssh/files/S50sshd15
1 files changed, 15 insertions, 0 deletions
diff --git a/openwrt/package/openssh/files/S50sshd b/openwrt/package/openssh/files/S50sshd
new file mode 100755
index 000000000..bb2369195
--- /dev/null
+++ b/openwrt/package/openssh/files/S50sshd
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+for type in rsa dsa; do {
+ # check for keys
+ key=/etc/ssh/ssh_${type}_host_key
+ [ ! -f $key ] && {
+ # generate missing keys
+ [ -x /usr/bin/ssh-keygen ] && {
+ /usr/bin/ssh-keygen -N '' -t $type -f $key 2>&- >&- && exec $0 $*
+ } &
+ exit 0
+ }
+}; done
+
+/usr/sbin/sshd