diff options
Diffstat (limited to 'package/openssh/files')
-rwxr-xr-x | package/openssh/files/S50sshd | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/package/openssh/files/S50sshd b/package/openssh/files/S50sshd new file mode 100755 index 000000000..bb2369195 --- /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 |