Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Desktop Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 19th November 2011, 15:23
corpus corpus is offline
Junior Member
Join Date: Jan 2011
Posts: 29
Thanks: 8
Thanked 12 Times in 9 Posts
Default How to Setup SSH access between VirtualBox Host and Guest VMs

wanted to install a test virtual machine on my Desktop pc for server and ispconfig proposes. Test new things, new software etc.
The problem was that the clipboard between host and virtual machine does not works if you haven't set up X. So i google it for the solution and i wrote a simple tutorial.


Go to
download virtual box for your machine
Debian 6.0 (Squeeze) virtualbox-4.1_4.1.6-74713~Debian~squeeze_amd64.deb
and Oracle VM VirtualBox Extension Pack
For use with Version 4.1.6 only
All Platforms (Windows, Mac OS X, Solaris and Linux) Oracle_VM_VirtualBox_Extension_Pack-4.1.6-74713.vbox-extpack

after go into your download folder and run as root

dpkg -i virtualbox-4.1_4.1.6-74713~Debian~squeeze_amd64.deb
after installation open the
with virtualbox (double click)
to install the Oracle VM VirtualBox Extension Pack

it will also ask you the root password during the installation

to have usb support between the the host and the guest machines edit /etc/fstab and add

usbfs /proc/bus/usb usbfs defaults,devmode=666 0 0
then do a

mount -a
as root from your terminal

open virtualbox
go to File-->Preferences-->Network and click on the "Add Host-only network (Ins)
it will create automatically a "vboxnet0" network
Click to OK to save changes

Add a new virtual machine and proceed with installation. I installed Debian 6.
After installation boot the new v.machine and then power off it.

Now go with your mouse on your virtual machine
Right-click --> Settings
Go to Network -- click on the second tab "Adapter 2"
check the "Enable Network Adapter" and choose from the drop-down Attached to: Host-only Adapter
It will automatically choose the "vboxnet0" in the Name field
Click to OK to save changes

Now open a terminal on your host maschine and execute

you will see something like this

vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00  
          inet addr:  Bcast:  Mask:
keep in mind the

Bootup your virtualmachine
login as root and run

pico /etc/network/interfaces
add these lines in the bottom

auto eth1
iface eth1 inet static
the address is based in the ifconfig results on you host machine

after this close and save
run in terminal

ifup eth1
Now go to your root machine's console and login with ssh to your guest machine

ssh user@
Those tested on a debian 6 host and also a debian 6 guest

Reply With Quote
The Following User Says Thank You to corpus For This Useful Post:
falko (20th November 2011)
Sponsored Links


Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot use USB in guest OS - Virtualbox amarumayo Installation/Configuration 3 19th November 2011 01:26
VBoxHeadless-Just one machine at a time? ricardoc HOWTO-Related Questions 9 9th May 2010 10:07
ISPConfig 3 in virtualbox on lenny host qriz Installation/Configuration 1 21st March 2009 03:23
Failover with VMWare Server - /var/vm isn't the right size.. Bart van Kleef HOWTO-Related Questions 24 30th August 2008 12:00
Can not access internet from Guest (vmware) of Debian Host quannv HOWTO-Related Questions 3 14th June 2008 20:46

All times are GMT +2. The time now is 17:55.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.