I have created a virtual machine in virtual box with host only network. I am able to ping to the virtual machine but when i try to ssh into the same machine it reject my request with following error

ssh: connect to host port 22: No route to host

I am able to ssh within the virtual machine.

ifconfig result on host machine :

vboxnet0 Link encap:Ethernet HWaddr 0a:00:27:00:00:00
         inet addr: Bcast: Mask:
         inet6 addr: fe80::800:27ff:fe00:0/64 Scope:Link
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:146 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:0 (0.0 B)
         TX bytes:17432 (17.4 KB)

and ifconfig within virtual machine just shows the loopback information .

  • 1
    Don't remove newlines and spaces when you copy-paste the output of a command, it makes it unreadable. Apr 28, 2015 at 21:46

1 Answer 1


Normally the vboxnet0 device has address This also shows in your config. Your ssh statement point to another address where '56' and '1' are exchanged. Your ping command probably just pings the hosts vboxnet0 device and since you only have a loopback device in your guest machine I suppose that you did not configure networking within the guest.

You might try to use ifconfig eth0 up (assuming that eth0 is your guests network interface name) within the guest operating system and try to ping ping from the guest or ping from the host. If that works, try to ssh using ssh from the host.


You must log in to answer this question.

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