Tutorials/Tips

Solution to freezing SSH sessions on Ubuntu 16.10

I manage several cloud servers via SSH, but after upgrading my main desktop to Ubuntu 16.10 (from Ubuntu 16.04), I observed that those (SSH) sessions would freeze just after a few seconds of inactivity, even right in the middle of editing a file.

I figured that the servers were not the problem, because that has never happened before, and the fact that it didn’t matter what Linux distribution the remote server was running. So there must have been a change in the default client configuration that was causing the problem.

Startpage to the rescue, which led me to this article. The fix offered by the author in that article is for Mac OS X, but it works just as well on any Linux distribution, with one less command to execute.

Related Post:  How to install Apache web server on Fedora

The fix is to set values for ServerAliveCountMax and ServerAliveInterval for the SSH client, which you do in a configuration file in the .ssh directory of your home folder. So create and open the file using the following command:

Then add the variables and their values in the following code block to it.

Related Post:  How to wake a VirtualBox guest from suspend mode in Linux

Close the file. That should solve your freezing SSH session issues. No need to adjust the file’s permissions, because the default is good enough. For more information about those and other variables, consult the manual page using man ssh_config.

openSSH logo

Subscribe to LinuxBSDos.com

Subscribe to receive the latest articles in your Inbox

Trust me, you'll not be spammed...

Please share:

We Recommend These Vendors and Free Offers

Google has got competition, because Presearch is building a blockchain-based search engine controlled by the community. At $0.15 a token, you can participation in Lot 3 of the token sale by clicking here

Open Money is building a solution that will run mainstream software on blockchain tech. Click here to get free tokens that will be the digital currency of the platform

COMSA allows centralized businesses to adopt blockchain technology. The token sale starts soon! Sign up for free by clicking here

Register now for Blockchain & Cryptocurrency Con 2018, international conference on blockchain technnology in Dallas, TX (USA), Feb. 23-24, 2018. Students can register at a 50% discount.

Launch an SSD VPS in Europe, USA, Asia & Australia on Vultr's KVM-based Cloud platform starting at $5:00/month (15 GB SSD, 768 MB of RAM).


Leave a Comment

Your email address will not be published. Required fields are marked *

*