From: Luis Chamberlain <mcgrof@kernel.org>
To: kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 7/8] destroy_guestfs.sh: remove known ssh key
Date: Thu, 7 Mar 2024 16:03:58 -0800 [thread overview]
Message-ID: <20240308000400.1646823-8-mcgrof@kernel.org> (raw)
In-Reply-To: <20240308000400.1646823-1-mcgrof@kernel.org>
When destroying a guest we should remove the known key so that if
we re-create the guest we won't be asked about a new key.
Without this the ssh-injection will fail on a guest if an old key was
already used in the bringup proces with:
virt-sysprep -a $ROOTIMG --hostname $name --ssh-inject <...>
Fix this.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
scripts/destroy_guestfs.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/destroy_guestfs.sh b/scripts/destroy_guestfs.sh
index 9c627f23..3cdd21a8 100755
--- a/scripts/destroy_guestfs.sh
+++ b/scripts/destroy_guestfs.sh
@@ -23,6 +23,7 @@ if [ -f "$GUESTFSDIR/kdevops_nodes.yaml" ]; then
fi
rm -rf "$GUESTFSDIR/$name"
rm -rf "$STORAGEDIR/$name"
+ ssh-keygen -q -f ~/.ssh/known_hosts -R $name 1> /dev/null 2>&1
done
fi
--
2.43.0
next prev parent reply other threads:[~2024-03-08 0:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 0:03 [PATCH 0/8] guestfs: fixes and enhancements Luis Chamberlain
2024-03-08 0:03 ` [PATCH 1/8] guestfs: use macros for drives for aarch64 Luis Chamberlain
2024-03-08 0:03 ` [PATCH 2/8] bringup: disable ZNS and CXL for guestfs Luis Chamberlain
2024-03-08 0:03 ` [PATCH 3/8] libvirt: move zns, largio and cxl to its own files Luis Chamberlain
2024-03-08 0:03 ` [PATCH 4/8] guestfs: move options to its own file Luis Chamberlain
2024-03-08 0:03 ` [PATCH 5/8] bringup: match default distro to user's distro Luis Chamberlain
2024-03-08 0:03 ` [PATCH 6/8] guestfs: remove explicit tap0 device name Luis Chamberlain
2024-03-08 0:03 ` Luis Chamberlain [this message]
2024-03-08 0:03 ` [PATCH 8/8] guestfs: verify new line on ssh include directive Luis Chamberlain
2024-03-08 9:55 ` [PATCH 0/8] guestfs: fixes and enhancements Luis Chamberlain
2024-03-08 14:14 ` Chuck Lever III
2024-03-08 14:26 ` Chuck Lever III
2024-03-08 15:44 ` Luis Chamberlain
2024-03-08 15:46 ` Chuck Lever III
2024-03-08 15:56 ` Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240308000400.1646823-8-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox