summaryrefslogtreecommitdiffstats
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-02 23:14:33 +0100
commit567b7e306045075abfbf92726517cd28e7c17914 (patch)
treef02fe4b9a7df2ef3cc2141a9b8177f6b5edb1865
parent692c2b365242b801cee99c60267cc8b2cfea960d (diff)
downloadpoky-567b7e306045075abfbf92726517cd28e7c17914.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: 3196249a6917a32491be56e70bbf26d3b9818e0e) 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>
-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