From 14d0f66cd28d2535a4c472f9df8c75acdc99f08a Mon Sep 17 00:00:00 2001 From: wbx Date: Tue, 7 Jun 2005 07:04:44 +0000 Subject: add openssh package, sshd does not work. why? git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1165 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- openwrt/package/openssh/files/S50sshd | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 openwrt/package/openssh/files/S50sshd (limited to 'openwrt/package/openssh/files/S50sshd') 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 -- cgit v1.2.3