The previous method of updating SSH known hosts removes the existing
host key of the ansible remote host. This commit changes this method
to scan and add the new ssh key of the ansible remote host into
~/.ssh/known_hosts. After this change, the ssh connection to the
ansible remote host will be accepted if the ansible remote host has
either the former key or the latter key.
Reviewed: https:/ /review. opendev. org/c/starlingx /ansible- playbooks/ +/798909 /opendev. org/starlingx/ ansible- playbooks/ commit/ 7374b81251a3b5b 60e38238e4c679f a5215ffd0c
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 7374b81251a3b5b 60e38238e4c679f a5215ffd0c
Author: Yuxing Jiang <email address hidden>
Date: Wed Jun 30 09:32:52 2021 -0500
Check and add remote host key into known_hosts
The previous method of updating SSH known hosts removes the existing ssh/known_ hosts. After this change, the ssh connection to the
host key of the ansible remote host. This commit changes this method
to scan and add the new ssh key of the ansible remote host into
~/.
ansible remote host will be accepted if the ansible remote host has
either the former key or the latter key.
Test see in: /review. opendev. org/c/starlingx /ansible- playbooks/ +/798918
https:/
Partial-Bug: 1934154 f5c8ffead0b2041 a5dedac6343
Signed-off-by: Yuxing Jiang <email address hidden>
Change-Id: I7c56e130ad8b75