From 53d63aad955f53b9d2b933b7ca19ef655ef55ab5 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb 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/openwrt@1165 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/openssh/files/S50sshd | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 package/openssh/files/S50sshd (limited to 'package/openssh/files') diff --git a/package/openssh/files/S50sshd b/package/openssh/files/S50sshd new file mode 100755 index 0000000000..bb23691954 --- /dev/null +++ b/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