A devbox has Windows 8.1 as the host OS running VirtualBox and a virtual machine with CentOS 7 for development. The devbox is connected to a CentOS 7 development server through an Ethernet cable. The development server is not connected to the Internet, or to any other computer.

The devbox Windows 8.1 host OS is able to SSH to the development server using PuTTY after making the config changes described in this other post. However, the CentOS 7 virtual machine inside the devbox is not able to make SSH connections to the development server.

In the devbox virtual machine, when I type

cd /etc/sysconfig/network-scripts

And then type:

ls ifcfg-*

The terminal prints out ifcfg-lo.

When I next type:

nano ifcfg-lo

The terminal shows:

# If you're having problems with gated making a martian,
# you can change this to something else (, for example)

However, I hesitate to make the other changes shown in the other posting because the devbox virtual machine needs to retain the ability to ssh over the Internet also.

What changes need to be made in the devbox to allow the CentOS 7 VM to SSH into the development server?

Note that the virtual machine on the devbox is able to SSH to remote servers over the Internet. So the current problem is just getting it to know how to connect to the local Ethernet development server when a user types ssh [email protected].

  • how do you have your virtual network set up in VirtualBox?
    – Jakuje
    Sep 3, 2015 at 6:41

1 Answer 1


My suspicion is that on Oracle VirtualBox the networking is set to 'NAT'. This would explain why you can SSH to the Internet as the Windows 8.1 host NATs the guest's IP addresses for you and sends them out on the hosts external facing interface (which I assume you have, but you haven't mentioned).

Change the networking on the guest to 'Bridge' and connect that bridge to the ethernet device that connects to the CentOS dev server. Next, change the IP address of the VM (using the instructions in that linked post) to one within the range used by Ethernet network such as

You could use the host IP address as the default gateway of the VM to save changing it again if you decide to use Internet Connection Sharing on the host to allow the CentOS machines to access the Internet.

  • Please check this followup question the user has posted. While I believe your “Bridged” option makes sense and would work on a standard network setup where the guest OS and host OS can pool a DHCP server on a router via “Bridged” connection, there is no such DHCP capabilities in computers connected to each other via a direct Ethernet-to-Ethernet connection. Sep 3, 2015 at 17:37
  • Thank you and +1 for getting me to name it and for directing me to the Networking Settings in VirtualBox. You also got me to stick with lo protocol. As it turned out, NAT networking was the best choice because it allows port forwarding. I set up a port forwarding rule to direct ssh traffic to the development server. This will become tedious over time as I have to turn port forwarding off and then on again, but for the time being it gets me what I need. The Bridge Networking Adapter GUI in VirtualBox did not give an option for port forwarding, but the NAT adapter did.
    – CodeMed
    Sep 4, 2015 at 0:30
  • @JakeGould - What's wrong with static IPs? This is a dev server after all. The post linked in the OPs question uses static IP addressing to get the physical machines to talk, this is just an extension of that. Sep 4, 2015 at 6:38
  • @CodeMed - the alternative would be to configure Internet Connection Sharing to NAT the physical ethernet adapter of your Windows machine to the adapter you are using to connect to the Internet (WiFi?). Sep 4, 2015 at 6:41
  • Did you actually check that follow up question I linked to? This poster has decent intentions but misses key details in context that make some answers not valid. And yes, I agree that direct connections via Ethernet work well—here is an answer where I explain it myself to someone else—but since this user is connecting a physical machine running VirtualBox to another physical machine it is simply not as straight forward. Please check that follow up question. Sep 4, 2015 at 6:47

You must log in to answer this question.

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