summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAsfak Rahman <asfakr@outlook.com>2021-06-25 09:52:57 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-20 19:05:45 +0100
commit7de42197339d42b7055874bc320cdb0f686cd5cb (patch)
tree9ffb316d382c9bb5439805854f5e664d0b35c71f /meta
parent2566c5c5e09b0ad90fbd25ded046cff0480f9707 (diff)
downloadpoky-7de42197339d42b7055874bc320cdb0f686cd5cb.tar.gz
openssh: Remove temporary keys before generating new ones
Key generation may wait for user input, due to the existence of temporary keys resulting from power interruption in the first boot. This prevents users from login via ssh. (From OE-Core rev: dceba60f817c61d36868a2def642fc4164ff53ab) Signed-off-by: Asfak Rahman <asfakr@outlook.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3196249a6917a32491be56e70bbf26d3b9818e0e) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-connectivity/openssh/openssh/sshd_check_keys1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh/sshd_check_keys b/meta/recipes-connectivity/openssh/openssh/sshd_check_keys
index 1931dc7153..ef117de897 100644
--- a/meta/recipes-connectivity/openssh/openssh/sshd_check_keys
+++ b/meta/recipes-connectivity/openssh/openssh/sshd_check_keys
@@ -6,6 +6,7 @@ generate_key() {
6 local DIR="$(dirname "$FILE")" 6 local DIR="$(dirname "$FILE")"
7 7
8 mkdir -p "$DIR" 8 mkdir -p "$DIR"
9 rm -f ${FILE}.tmp
9 ssh-keygen -q -f "${FILE}.tmp" -N '' -t $TYPE 10 ssh-keygen -q -f "${FILE}.tmp" -N '' -t $TYPE
10 11
11 # Atomically rename file public key 12 # Atomically rename file public key