I am trying to SSH into a Ubuntu 14.04 VM from OS X but am not able to do so. I have tried various suggestions from Googling but none seems to work. ping does not work either and returns the host unreachable error.

I am using the "Host-only adapter" for the guest OS. Both the host and the guest OS are running on the same machine. In the guest OS, I am able to SSH to localhost so I guess SSH is properly setup in the guest OS. The host OS (OS X) does not have any firewalls and the guest OS does not have one either. To me it seems the host OS is not able to locate the guest OS at all. The guest OS is configured with a static IP address.

Any suggestions on how I can try to resolve this issue?


migrated from serverfault.com Dec 25 '14 at 3:52

This question came from our site for system and network administrators.

  • 3
    Sounds to me like your real problem is the pinging...once ping is working, I think SSH will too. – BenjiWiebe Dec 25 '14 at 3:54
  • Are you using VirtualBox, or something else? – BenjiWiebe Dec 25 '14 at 3:57

Host-only network for a vm usually add an additional subnet (192.168.A.x) to the host machine with a virtual network adapter. You should check which ip address is assigned to the host and which to the guest in this virtual network.

on mac open a terminal and use "ifconfig" or "ip addr" to get ip addresses for the host. On linux do the same and view ip addresses. Then try to ping the address in the same subnet (eg. 192.168.54.x). Once ping respond you can use the discovered ip address to ssh from osx to ubuntu.

Anyway, the fastest way is to change the guest adapter to bridged and manually assign an ip address in the same subnet as host os. In this way the guest os is a directely connected host on the physical network and is reachable from other pc, the router, network printers etc etc.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.