Keep putty from disconnecting from VMware Linux guest when I close my laptop

24
2014-04
  • Ben Dilts

    I have a Linux guest in VMware that I connect to from the Windows 7 host via putty, over the VM's host-only interface. When I close my laptop lid and it goes to sleep, then open it again, all my putty connections are disconnected.

    Any setting I can tweak somewhere to keep those connections alive? It works in VirtualBox without any problem, but I can't use VirtualBox for various reasons I won't go into here.

  • Answers
  • Henry Rivera

    There is a fork of Putty called PuTTYtray which I've been able to get to reconnect to a VMWare host when my system awakes from sleep.

    I found that you have to set both reconnect options to get it to work, not sure if it's just my setup.

    You can find it here: [ https://puttytray.goeswhere.com/ ].

  • uSlackr

    When the laptop goes to sleep, network activity stops and TCP connections close for lack of activity (assuming the O/S doesn't explicitly close them before going to sleep).

    You could stop your laptop from going to sleep when you close it, but stopping it from disconnecting while sleeping is unlikely

    \\Greg

  • P.T.

    You can use mosh to work-around this problem. It will transparently re-connect when the network connection comes back. Its not putty, and it has its own issues, but if you just want your command-line connection to survive a network disconnect mosh works great for me.


  • Related Question

    Linux with Windows XP vmware guest unable to access certain Internet hosts
  • unknown

    I have annoying problem. My setup is the following: debian Linux, 64 bits, VMWare workstation 7 host, with Windows XP running as guest. From Firefox, or Internet Explorer, I am unable to access few sites, for example nvidia.com, osdir. Basically get connection timed out, on the other hand ping works to those sites. Moreover, Slashdot loads very very slow and sometimes gets horrible text-only version.

    everything works fine on Linux host

    I suspect it has something to do with routing on Linux, I recall having similar problem long time ago, which was fixed by setting something in /proc.

    I tried setting MTU and TCP window size on Windows lower, but did not help

    Any idea what is going on?


  • Related Answers
  • daleoffret

    unknown,

    You haven't specified the network connection type from the guest to the host. Your explanation suggested a routing issue on the Linux side. From that I am guessing you are using the DHCP enabled virtual networking segment. My rule of thumb is to use NIC adapter bridging. I don't use the virtual networking segments on VMWare workstation unless I have a good reason. Using the bridging option reduces both complexity and overhead from the virtualization environment. With bridging you can even remove the IPV4 or IPV6 from the Linux OS and the VMWare host will still run without complaint.

    Very cool.

    My suggestion is to disconnect the Windows XP guest NIC from the virtual network segment and change it to the 'Bridge' or 'Bridging' option.

  • dag729

    I know that this is probably your not case, but you could try to take a look at the DNS for your guests OSes? I'm using google DNS, that work kinda good: 8.8.8.8 and 8.8.4.4; you can also give a try to OpenDNS i you like: 208.67.222.222 and 208.67.220.220.

    Bye