Skip to content

Instantly share code, notes, and snippets.

@chenxiex
Last active October 14, 2024 08:25
Show Gist options
  • Select an option

  • Save chenxiex/0387452e66ac9894a57b8fabee450e2d to your computer and use it in GitHub Desktop.

Select an option

Save chenxiex/0387452e66ac9894a57b8fabee450e2d to your computer and use it in GitHub Desktop.
Configuration for ssh into Gnome Boxes
# https://unix.stackexchange.com/questions/627187/ssh-into-gnome-boxes-os
# Edit first line
-<domain type='kvm'>
<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm">
# Delete "interface" section
-<interface>
-...
-</interface>
# Add before </domain>
<qemu:commandline>
<qemu:arg value="-device"/>
<qemu:arg value="rtl8139,netdev=hostnet0,bus=pci.0,addr=0x10"/> //bus=pcie.0 for Windows guests
<qemu:arg value="-netdev"/>
<qemu:arg value="user,id=hostnet0,hostfwd=tcp::2222-:22"/> //for multiple port forwarding, add more 'hostfwd='
</qemu:commandline>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment