summaryrefslogtreecommitdiffstats
path: root/openwrt/package/openssh/files/S50sshd
blob: 2ea168394c5a252d76cc5afac647293723bcc77c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

for type in rsa dsa; do {
  # check for keys
  key=/etc/ssh/ssh_host_${type}_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
mkdir -p /var/empty
/usr/sbin/sshd