Last active
May 27, 2024 03:52
-
-
Save stephenlauck/3d147a424081ffdbc3098848823bfd1f to your computer and use it in GitHub Desktop.
cwitch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export VM=dist-lunar-01 IMG=https://cloud-images.ubuntu.com/lunar/current/lunar-server-cloudimg-amd64.img OS=ubuntu22.04; curl https://spellcaster.sh/spells/cwitch | bash && ssh -t -i ./id_ed25519 -o StrictHostKeyChecking=no | |
(virsh domifaddr $VM | awk -F'[ /]+' '{if (NR>2) print $5}') |
export VM=dist-noble-01 IMG=https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img OS=ubuntu24.04; curl https://away.spellcaster.sh/spells/cwitch | bash && ssh -t -i ./id_ed25519 -o StrictHostKeyChecking=no $USER@$(virsh domifaddr $VM | awk -F'[ /]+' '{if (NR>2) print $5}')
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ssh-keygen -f "$HOME/.ssh/known_hosts" -R "$(virsh domifaddr $VM | awk -F'[ /]+' '{if (NR>2) print $5}')" && virsh destroy $VM; virsh undefine $VM --remove-all-storage && rm user-data