summaryrefslogtreecommitdiff
path: root/openwrt/package/openssh/files/S50sshd
blob: bb23691954958944974d09d2264a8de5e1aaee68 (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_${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