LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Not able to connect to virtualbox Linux using ssh in same LAN (https://www.linuxquestions.org/questions/linux-newbie-8/not-able-to-connect-to-virtualbox-linux-using-ssh-in-same-lan-4175513294/)

unclesamcrazy 08-04-2014 07:46 AM

Not able to connect to virtualbox Linux using ssh in same LAN
 
I am not able to connect to Linux (CentOS), installed in virtualbox, using ssh in same LAN.
The reason is difference in LAN IP range.

The virtual box Linux (CentOS) LAN IP is 10.42.0.x
and the system where virtual box is installed (ubuntu), LAN IP is 192.168.0.x

Now I am not able to connect to the CentOS from other systems of same LAN because when I try to connect, it says
Code:

ssh: connect to host 10.42.0.x port 22: No route to host
I can connect ubuntu (Parent system) from other systems of LAN.

I am facing same problem in one of the system which is connected to the internet using hotspot. It gets same IP range i.e. 10.42.0.x and it can't be connected from other system of same LAN.

Please help.

smallpond 08-04-2014 10:32 AM

Installing in a VM is no different than installing on hardware. You don't need a router if it is on the same subnet, you do if it isn't. Why are you putting it on a different subnet if you want to get to it from the LAN?

unclesamcrazy 08-04-2014 10:38 AM

Thanks for the reply.
But how to solve it in wifi hotspot.
I want to set the common IP range for all devices connected from same wi-fi hotspot.
How can I do it?
Please help.

fortran 08-05-2014 04:40 AM

Open Network settings of your virtualbox Linux OS.
Check the box "Enable Network Adapter"
Attached to 'Bridge Adapter'.
Select the name like eth0 or eth1 or eth2, your active configuration of your LAN
click on OK.
Now boot your virtual box OS. Your IP range should be the same as other devices of same LAN depends on the selected 'Name' in Network Adapter Setting.


All times are GMT -5. The time now is 03:42 PM.