Within a minute of connecting to my remote Linux server through SSH, my session times out and I cannot contact the server until a few seconds have passed. Meanwhile, I'm connected to other servers without interruption. This is only happening when I establish connection from an hotel wireless AP. When I connect from my phone's Internet, the problem does not occur. Does anyone know what might be causing these unusual timeouts?
migrated from stackoverflow.com May 16 '10 at 0:51
This question came from our site for professional and enthusiast programmers.
On your server, add the following line to
This will cause the server to send a message to the client requesting a response, if there has been no activity for 30 seconds. (Basically a ping to see if the client is still there).
If the hotel's firewall is kicking off "inactive" connections, this should keep your connection open as it will see activity at least once every 30 seconds.
If it only happens when you are at a hotel, then the problem is the hotel.
It sounds to me like the hotel's NAT is configured to aggressively time-out idle-looking sessions.