Shutdown your VM and do:
VirtualBox > Settings > Network > Add (you will get vboxnet0
)
On a terminal ifconfig
will show you new interface vboxnet0
VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0
Install OpenSSH Server
Edit /etc/network/interfaces
file to append the following lines:
auto eth1
iface eth1 inet static
address 192.168.56.10
netmask 255.255.255.0
Run sudo ifup eth1
from the Ubuntu command line.
SSH server should be up and running. Switch to your host terminal and enter ssh 192.168.56.10
sources:
I had considerable difficulty setting up.
This is what worked for me:
I followed the gist with @chao1995's suggestions.
In the VM:
My
etc/network/interfaces
looks like this:To bring up the service, I ran:
In my host terminal:
Wahoo!
Troubleshooting Checklist
In
VirtualBox Manager
Settings > Network > Adaptor 2
set toHost-Only Adaptor (vboxnet0)
?Settings > System > Enable I/O APIC
checked?In the VM
OpenSSH
installed? ($ sudo apt-get install openssh-server
)/etc/network/interfaces
, replacingeth1
with your interface name fromifconfig
?$ sudo ifup <interface name>
?On your host
ssh
into? (Runifconfig
. Use the value ofvboxnet0
'sinet
field. Ifvboxnet0
is not available, review the section aboveIn VirtualBox Manager
)ssh <username>@<ip address>
and log in.I hope that helps.
Good luck out there!