Add support for SSH from Host to VM
The VMs that OpenQA launches have an internal IP that is not reachable from the Host. Therefore, there is no way to SSH into them, only VNC is available.
The problem of VNC is that it limits the user comfort when debugging. SSH allows much better experience as you can use your own console and use SCP, bidireccional copy/paste, mouse scrolling, etc.
However, it is possible to SSH from the VM to the Host, therefore Reverse SSH can be used, but it is just a workaround. Having ssh supported directly from the Host would be more convenient.
I think this could be achieved by changing the qemu command line to launch the VM adding a parameter -net user,hostfwd=tcp::7777-:8001
Not sure if this is the right place, but it could help to look at this line: https://github.com/os-autoinst/os-autoinst/blob/master/backend/qemu.pm#L581
#3 Updated by jlausuch over 3 years ago
I am currently doing reverse SSH to access the VM. So, I need to VNC to the VM and run the ssh command to connect to the Host. Then, from the Host I can connect to the VM. The ticket aims at trying to speed this up and make it automatic somehow. Feel free to close this ticket if it doesn't make sense.
#6 Updated by okurz almost 2 years ago
Do I understand correctly that under the assumption that the SUT provides ssh access (sshd running, firewall allowing tcp/22 access) the worker host should forward the ssh connection so that next to VNC one could connect to the SSH server of the SUT without additional hops, e.g. not needing to ssh into the worker host and ssh into SUT, right?