diff options
-rw-r--r-- | meta/recipes-connectivity/openssh/openssh/init | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh/init b/meta/recipes-connectivity/openssh/openssh/init index e7f3971324..37c8e7b907 100644 --- a/meta/recipes-connectivity/openssh/openssh/init +++ b/meta/recipes-connectivity/openssh/openssh/init | |||
@@ -20,6 +20,7 @@ mkdir -p $SYSCONFDIR | |||
20 | HOST_KEY_RSA=$SYSCONFDIR/ssh_host_rsa_key | 20 | HOST_KEY_RSA=$SYSCONFDIR/ssh_host_rsa_key |
21 | HOST_KEY_DSA=$SYSCONFDIR/ssh_host_dsa_key | 21 | HOST_KEY_DSA=$SYSCONFDIR/ssh_host_dsa_key |
22 | HOST_KEY_ECDSA=$SYSCONFDIR/ssh_host_ecdsa_key | 22 | HOST_KEY_ECDSA=$SYSCONFDIR/ssh_host_ecdsa_key |
23 | HOST_KEY_ED25519=$SYSCONFDIR/ssh_host_ed25519_key | ||
23 | 24 | ||
24 | check_for_no_start() { | 25 | check_for_no_start() { |
25 | # forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists | 26 | # forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists |
@@ -51,10 +52,14 @@ check_keys() { | |||
51 | echo " generating ssh ECDSA key..." | 52 | echo " generating ssh ECDSA key..." |
52 | ssh-keygen -q -f $HOST_KEY_ECDSA -N '' -t ecdsa | 53 | ssh-keygen -q -f $HOST_KEY_ECDSA -N '' -t ecdsa |
53 | fi | 54 | fi |
54 | if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then | 55 | if [ ! -f $HOST_KEY_DSA ]; then |
55 | echo " generating ssh DSA key..." | 56 | echo " generating ssh DSA key..." |
56 | ssh-keygen -q -f $HOST_KEY_DSA -N '' -t dsa | 57 | ssh-keygen -q -f $HOST_KEY_DSA -N '' -t dsa |
57 | fi | 58 | fi |
59 | if [ ! -f $HOST_KEY_ED25519 ]; then | ||
60 | echo " generating ssh ED25519 key..." | ||
61 | ssh-keygen -q -f $HOST_KEY_ED25519 -N '' -t ed25519 | ||
62 | fi | ||
58 | } | 63 | } |
59 | 64 | ||
60 | export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" | 65 | export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" |