I borrow the word "passthrough" from GPU passthrough in virtual machine because the concepts sound similar to me, at least from usage point of view. Here I have a QEMU MV, both host and guest being ubuntu 20.04. I use port forwarding to ssh from host into guest:
ssh localhost -p5555
Now I have a second host, also running ubuntu 20.04. Suppose the hostname of the machine containing QEMU MV is host1
, while the hostname of the second host is host2
. host2
can ssh into host1
using normal ssh command. My question is: how to use a single ssh command to connect host2
to the guest OS? Assume the user names are all the same on host1
,host2
and guest: myname
. Since under port forwarding, host1
uses localhost
to specify the guest VM, not its hostname, so I don't know how to write the ssh command.
I tried ssh myname@host1 -p5555
on host2
but ssh
does not return. Instead, it behaves like a command-line editor. The guest is on. So, what option can I use to let a single ssh command to connect from host2
into the guest OS? Thanks.