Keeping Ubuntu ssh connected for a long time is a stand-out Linux operating system. In just a few years, it has gradually become a shining pearl in the Open Source Field.
More and more users are using ubuntu, but some users say that ssh connections under Ubuntu will always be disconnected,
If you ignore it for a while, you will lose the response. www.2cto.com. How can I keep the ssh connection to the server or sshtunnel? In fact, it is also very convenient, as long as you add two parameters to the/etc/ssh/ssh_config file, the line is 1 TCPKeepAliveyes 2ServerAliveInterval300
The previous parameter indicates to keep the connection. The next parameter table indicates that a packet is sent to the server every five minutes, indicating "I am still alive". If you do not have the root permission, modify or create ~ /. Ssh/ssh_config is also possible.