notAperson535 / OneClick-macOS-Simple-KVM

Tools to set up a easy, quick macOS VM in QEMU, accelerated by KVM. Works on Linux AND Windows.
https://notAperson535.github.io/OneClick-macOS-Simple-KVM
MIT License
642 stars 50 forks source link

Feature Request: Port forwarding for SSH connections from host to guest #68

Closed NotReallyEight closed 1 year ago

NotReallyEight commented 1 year ago

Is your feature request related to a problem? Please describe. I would like to transfer files through SFTP connection from host machine to guest MacOS VM.

Describe the solution you'd like A way to make port forwarding so that SSH connections are possible.

Describe alternatives you've considered I have considered using external cloud services to move data, but it's much slower than SFTP, so I thought it would be a good feature / documented thing. (Sorry if this is not the correct issue template but I cannot find any that suite this)

pezzeonline commented 1 year ago

You have to edit basic.sh configuration updating this line from

-netdev user,id=net0 \

to

-netdev user,id=net0,hostfwd=tcp::20001-:22

Then you need to enable SSH from Mac OS. You can change external port 20001 to whatever you want.

notAperson535 commented 1 year ago

Thank you for the answer! I'll add that to basic.sh when I have the time