Ubuntu – Virtual Machine Putty connection

puttyvirtualization

I've created a VM running on my PC and am trying to connect the two via Putty. I have Putty installed on my PC, and openssh server and client installed on my VM. When I drop my IP address into the Putty client, a window will open up, but it's completely blank. I can highlight the blank window, but can't type anything. After a few minutes the window will close from a connection time out.

Is this my firewall??

Best Answer

If you are using Virtualbox, by default it will emulate the network using NAT. This is the simplest way to provide network access to the virtual network adapter inside the virtual machine, but it has the side effect that you can't actually connect to the services on the virtual machine from the host system.

You would need to change the mode of network emulation in the virtual machine from NAT to "bridged".

Note that this is slightly more complex from your host operating system's point of view as it has to get low level access to your host's network adapter at the packet level. This involves installing a special driver, particularly on Windows hosts. Essentially your network adapter on the host will need to start behaving in a way like multiple network adapters. This can sometimes (but not in normal situations) conflict with your outer network.

Instead of "bridged", you could also use "host-only networking" which avoids all the above potential issues but then your guest OS won't have access to the wider network (eg the Internet).

If you're using something other than Virtualbox, the issues will probably be the same, but the way of fixing it may not be.

Related Question