Can't SSH between host and guest OS in VMware

Q I use VMware Workstation to run various virtual machines, both Windows and Linux - for web development and also to try out different distros. Recently I've lost the ability to SSH between the host (Ubuntu) and guest OSes. The ssh commands just hang until I hit Ctrl+C. I can SSH into the host or the guest from my laptop on the same network, and I can connect to the laptop from the host or any of the virtual machines, it seems to be only connecting between the host and guest on the same machine that is problematic. I can ping a guest from a host and vice versa, it onlyappears to be SSH that is affected, but I haven't changed any of my SSH settings on the host, and as it affects all guests, I don't see how it can be a settings problem there. I am using bridged networking, as I have always done and this worked previously.

A I was hit with exactly the same problem. At first, I suspected an issue with SSH, but then I found that other protocols failed too. It turned out that anything using TCP was broken, and the problems were brought about by a kernel update. The change was in the support for the TCP Offload engine in some network cards (in my case an Attansic L1 Gigabit controller). The offload engine passes some of the load for TCP processing from the kernel to the network card's controller, which causes a problem when the network traffic isn't going through the network controller, even though it is on the same network, a situation unique to virtual machines. Bridged networking gives the virtual machine an IP address on the same subnet as your LAN, but the traffic doesn't go through the card. The solution is as simple as turning off some of the offload engine's features with ethtool. To turn off everything that is likely to cause a problem, run

sudo ethtool --offload eth0 rx off tx
off sg off tso off

If this works, you can narrow down the options you disable; on my system I only needed

sudo ethtool --offload eth0 tx off

Once you have identified the correct parameters to disable, you can then add the command to /etc/rc.local (without the sudo part) to have it executed automatically when you boot.

Follow us on or Twitter

Username:   Password: