Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.


  Search this Thread
Old 06-04-2011, 09:36 AM   #1
LQ Newbie
Registered: Jun 2011
Distribution: Arch Linux, Crunchbang
Posts: 2

Rep: Reputation: Disabled
host only networking for "Crunchbang host" "Arch Linux guest"

Good morning,

I have a “Crunchbang 10“ (Statler) installed as the host, and Arch linux installed in Virtualbox 4.0.6. My goal is to be able to ssh into the the guest from the host. I tried to follow this post
but it is somewhat sketchy.

My questions are as follows:
What changes, if any, are to made to the host’s network configuration, in this case /etc/network/interfaces? What verbiage is to be used?
What changes are to be made to the guest’s network interface, in this case /etc/rc.conf? What verbiage is to be used?
Does one access the host from the guest, and if so, how, host name and ip address of the host?
If one wishes to access the guest from the host, how does one do that?
Is it ssh guest hostname + ip address of the guest?

In short, can someone explain what the author of the post was trying to communicate? I Googled many posts over a period of hours, but they are all incomplete, written for very advanced users and pale besides something like the Arch Linux beginner’s guide, and most of the Ubuntu’s documentation, hence my problem. Arch Linux on an encrypted LVM jfs is my main system, so respondents, know that your time will not be wasted.

Clarification would be greatly appreciated

Last edited by ted9411; 06-05-2011 at 06:46 AM.
Old 06-05-2011, 11:27 AM   #2
Registered: Apr 2009
Distribution: debian gnu/linux
Posts: 798

Rep: Reputation: Disabled
if you use -> settings -> network -> NAT (the default, btw).
ssh guest_username@
should work to ssh to the guest
ssh host_username@
should work to ssh to the host.

if you got a router use -> settings -> network -> bridged and use `ifconfig` to find out the IP number (which will be assigned by the router). Same command: ssh user@IP.

Other ways to do it i don't know, though there are. Both ways are easy, no need to configure anything.

The extra voodoo to set up Arch in /etc/rc.conf is beyond me. In Debian there is no further configuration required ( might be for Arch too, no clue)
Old 06-05-2011, 11:37 AM   #3
LQ Newbie
Registered: Oct 2008
Posts: 1

Rep: Reputation: 0
Hi ted9411,

I'm not familiar with the distros you are using but the general principle outlined in my post are to use 2 interfaces for networking on your guest.

1. NAT provides outbound internet access.
2. Host Only network provides a way to communicate between the guest and the host.

You could simply use bridged networking which uses the interface of the host to connect to the network, but given I want my set-up to be rock-solid for travel (This was written with a laptop in mind) I use the two network adaptors approach outlined above so there's no issue when disconnecting from networks and working without being on a network.

Vboxnet0 is set-up by Virtualbox itself - if it isn't visible when running /sbin/ifconfig on the host then check "File -> Preference -> Network" in the VirtualBox Manager. Ensure that DHCP is enabled (worth doing in-case that's how you want to use it).

On the guest all you need to do is configure the 2nd adapter, the first should be automatic, and the 2nd might be too depending on what OS or version of OS you're using.

In the case of the article (I was using JEOS - basically a minimal Ubuntu Server install so I needed to set-up eth1 in /etc/network/interfaces and in the post I detail this using a static address. That said there would be nothing stopping you using DHCP to have an IP address automatically assigned.

Hope this helps to point you in the right direction to get you up and running. Let me know if not!

Stuart (muffinresearch)
Old 06-06-2011, 09:29 AM   #4
LQ Newbie
Registered: Jun 2011
Distribution: Arch Linux, Crunchbang
Posts: 2

Original Poster
Rep: Reputation: Disabled
Perhaps this description of my understaning of the problem will help :)

Thank you J1alu & muffinresearch for replying. Who would think that the author of an article would reply to my host? I am flattered.

What I would like to do is provide you with an overview of my understanding of the whole ssh between VirtualBox guest (VBG) & the host. Perhaps you can correct my understanding of what is supposed to happen.

1) With the VBG off, setup up a host only adaptor.
2) Find the DHCP of the host or create a static ip address on the host as eth1.
3) Start the VBG.
4) From within the VBG, /sbin/ifconfig vboxnet0 up. Note: this command varies from distro to distro.
5) On the crunchbang host create eth1 from vboxnet0. Note: Crunchbang = Minimalist Ubuntu.
6) Ping the host, from the VBG, which will be blocked by the firewall.
7) Ping the VBG from the host. The VBG will respond.

This next part is difficult.
From the guest, is it ssh hostname_of_the_host@192.123.123.X of the host? Or is it ssh your_curent_username@192.123.123.x of the host?

Also, the host rejects vboxnet0 as a valid ethernet device, so should it be dubbed eth1?

As you can see I am lost. However, I have potential. I can manually setup LVM and multiple partitioned flash drives containing multiple bootable kernels with Grub Legacy as the bootloader and custom splash images. Not guru stuff but not too shabby either, so I know I can do this but not without help. Again, thanks for responding so fast. I hope the above can help you to help me while minimizing your loss of time.

Side note:
I've found that I do best when things articles are written with the goal listed first, followed by an overview of the major steps to be taken. After that if each of the major steps becomes a detailed and enumerated series of steps. That is the type of writing that serves me best. I say that not to criticize, but it's works so well for Ubuntu, Arch and a few others. Writing is hard work. However, I feel that constructive criticism that has the potential to benefit the Linux community is always warranted where applicable.

Last edited by ted9411; 06-06-2011 at 09:32 AM.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CrunchBang 10 "Statler" r20110207 Install Hangs "Detecting Network Devices" jv2112 Linux - Newbie 2 05-04-2011 06:48 PM
KVM Win XP guest can internet, can see smb on Slack 12.1 host "but can't find path" acummings Slackware 6 12-02-2008 02:16 AM
Couldn't display "SMB:///" , No host "(Null)" could been Found?????? munkey Linux - Newbie 3 05-03-2004 05:30 PM
Couldn't display "SMB:///" , No host "(Null)" could been Found?????? help munkey Fedora 6 04-30-2004 07:04 PM
"host" ok, but "ping" can't find ip address hardigunawan Linux - Networking 2 05-16-2002 06:41 PM > Forums > Linux Forums > Linux - Virtualization and Cloud

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

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