qemu: ssh hostfwd on 127.0.0.1 instead of 0.0.0.0
Make it accessible over localhost only. The idea is that users can login into the VM on their own PC while developing, not that it's exposed over the network. If somebody needs to have hostfwd on another IP, send a patch to make this configurable via argparse. Reviewed-by: Luca Weiss <luca@z3ntu.xyz> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20221221220305.1809-1-ollieparanoid@postmarketos.org%3E
This commit is contained in:
parent
917ff92f63
commit
faccbdc2eb
|
@ -184,7 +184,7 @@ def command_qemu(args, arch, img_path, img_path_2nd=None):
|
|||
else:
|
||||
command += ["-device", "virtio-mouse-pci"]
|
||||
command += ["-device", "virtio-keyboard-pci"]
|
||||
command += ["-netdev", "user,id=net,hostfwd=tcp::" + port_ssh + "-:22"]
|
||||
command += ["-netdev", f"user,id=net,hostfwd=tcp:127.0.0.1:{port_ssh}-:22"]
|
||||
command += ["-device", "virtio-net-pci,netdev=net"]
|
||||
|
||||
if arch == "x86_64":
|
||||
|
|
Loading…
Reference in New Issue