Last active
October 14, 2024 08:25
-
-
Save chenxiex/0387452e66ac9894a57b8fabee450e2d to your computer and use it in GitHub Desktop.
Configuration for ssh into Gnome Boxes
This file contains hidden or 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
| # 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