LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-04-2014, 08:46 AM   #1
unclesamcrazy
Member
 
Registered: May 2013
Posts: 187

Rep: Reputation: 1
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.
 
Old 08-04-2014, 11:32 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,609

Rep: Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702
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?
 
Old 08-04-2014, 11:38 AM   #3
unclesamcrazy
Member
 
Registered: May 2013
Posts: 187

Original Poster
Rep: Reputation: 1
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.
 
Old 08-05-2014, 05:40 AM   #4
fortran
Member
 
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 300
Blog Entries: 2

Rep: Reputation: 51
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't connect to SSH server on a VirtualBox VM (bridge mode) yzT! Linux - Networking 2 03-03-2014 12:59 PM
My ssh isn't working for some domains (VPN), but Virtualbox can connect Bjorne Linux - Networking 3 01-07-2011 10:35 AM
Can't connect to SSH server from outside the LAN seanwong Linux - Networking 5 06-22-2009 06:13 PM
Can connect to SSH via LAN but not WAN gauge73 Linux - Networking 5 02-08-2007 01:13 AM
Connect LAN Games through SSH TUNNEL pujakofriendly Programming 2 01-11-2007 08:08 AM


All times are GMT -5. The time now is 03:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration