0

It is well known how to ssh into a Virtual Machine from a Linux Host machine (at least with Virtual Box). We have to set a port forward rule into the vm's network settings. After that we can simply ssh -p 5677 [email protected]

But how can we do the reverse ? I mean, ssh into the host machine from the vm.

1
  • usually there isn't any particular configuration of the network required, unless you are using a host-only network adapter. you should just be able to plug in the hosts IP, and SSH to it. Commented Feb 23, 2022 at 22:15

1 Answer 1

0

You can interact with the virtual switch, since your are attached to the virtual switch; checkout in ncpa.cpl, if windows, a network device should be there like VirtualBox Host-Only Network. Your host should have an ipv4 assigned and your vm should have the same in the same cird, then you can just ssh to your host ip in the same lan.

Since windows, you should enable the firewall ports for that and have an ssh server running.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .