Skip to content

Instantly share code, notes, and snippets.

@stephenlauck
Last active May 27, 2024 03:52
Show Gist options
  • Save stephenlauck/3d147a424081ffdbc3098848823bfd1f to your computer and use it in GitHub Desktop.
Save stephenlauck/3d147a424081ffdbc3098848823bfd1f to your computer and use it in GitHub Desktop.
cwitch
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 $USER@$(virsh domifaddr $VM | awk -F'[ /]+' '{if (NR>2) print $5}')
@stephenlauck
Copy link
Author

stephenlauck commented Oct 17, 2023

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

@stephenlauck
Copy link
Author

stephenlauck commented May 27, 2024

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