You have to attach the VirtualBox adapter to Bridged and assign an IP which should come under you LAN.
These can be done inside network settings of corresponding virtual box.
Only then, you can access the VirtualBox from outside machine.
Lets have some knowledge on attaching virtual box NIC in a network. here are four the cases.
- Network Address Translation (NAT)
- Bridged networking
- Internal networking
- Host-only networking
Network Address Translation (NAT):
In NAT, the virtual box will get an IP address from the host machine(DHCP). Here the virtual box seems in
a different network with respect to the host machine. Outside world can't access the virtual box.
By default, new virtual boxes are attached to NAT.
Here the virtual box will act as a separate machine in the LAN as the host machine. host machine
and virtual machine will be in the same network. So the outside world can access the host machine.
You should attach the network adapter to Bridged to ssh to your virtual box from another system in
Here, if you have multiple virtual boxes in a host machine, all are attached to Internal, then they will
be like in a separate network than the host, and entire communication among them stays within the host and
the communications are only visible to the VM's on that network.
Host only networking:
Host-only Networking is like Internal Networking in that you indicate which network the Guest sits on.
For example if two virtual boxes are under network named 'Network1', these can communicate each other as
in the case of internal networking and additionally the Host can see them too. However, other external
machines cannot see Guests on this network, hence the name "Host-only".
Good Luck dude :)