Keeping Idle SSH Sessions Alive on Ubuntu and Linux Mint

Album Cover: No Code

"Are you woman enough to be my man?"
Pearl Jam / Hail Hail

Posted on December 20, 2013 10:33 AM in Computers
Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

As I mentioned here in the past, I've been using Linux more and more lately, and my flavor of choice is Linux Mint, which is a derivation of the very popular Ubuntu flavor. Very recently, I was "forced" by my cable Internet provider, henceforth referred to as "the worst company in the world," to upgrade my cable modem so that I could take advantage of recent improvements in their network speeds. Although I'm a strong believer in "if it ain't broke, don't fix it" and my old cable modem was getting the job done, I'm an even bigger sucker for speed, so I relented and set up the new modem when it arrived. Since then, whereas I had no problems with long idle SSH connections before, I have been experiencing lost connections and frozen terminal windows on a consistent basis.

Assuming this was part of the "awesome" that the worst company in the world markets so heavily, I first figured that my best option would be to roll back to my older cable modem that didn't exhibit the problem. Fortunately, though, I did some research and found that there is a straightforward Linux solution to the problem.

By adding a ServerAliveInterval line to my SSH configuration file at /etc/ssh/ssh_config, I was able to specify an interval at which my SSH client would send a "keep alive" signal to the SSH server, thereby keeping the connection "active" even when actually idle. I went with a value of 180 for the ServerAliveInterval setting, meaning that I send a "keep alive" signal every three minutes, and that has worked well for my purposes.

My assumption is that something in the new modem I received from the worst company in the world more aggressively closes idle network connections in an attempt to keep the network running efficiently. Rather than spending many hapless hours on the phone with technical support reps who doubtless would have had no clue that this is what changed from the previous modem to the next, I went with a hunch and found a solid solution that will hopefully keep my idle SSH connections in business from here on forward.

Comments

msattsjj on July 18, 2015 at 4:56 PM:
logo design on September 08, 2016 at 4:09 AM:

I imagine that a debt of gratitude is in order for the valuabe data and bits of knowledge you have so given here.

Permalink

buy followers on instagram on September 23, 2016 at 10:36 PM:

Hi, I have perused a large portion of your posts. This post is likely where I got the most valuable data for my exploration. A debt of gratitude is in order for posting, perhaps we can see more on this. Are you mindful of whatever other sites on this subject.

Permalink

buy likes on instagram on September 23, 2016 at 10:36 PM:

I just couldn't leave your site before letting you know that I genuinely delighted in the top quality data you present to your guests? Will be back again often to determine the status of new posts.

Permalink

PS4 Remote Play Apk on October 05, 2016 at 6:43 AM:

it has been months for me. Well this article that ive been waited for therefore long.

Permalink

gluten-free on October 28, 2016 at 11:01 AM:

I’m definitely going to look into it. Really very useful tips are provided here. Thank you so much. Keep up the good works.

Permalink

CCTV Dubai on November 01, 2016 at 6:32 AM:

I would have never considered any of these if I didnt come across this. Thanks!.

Permalink

Truth Talks on November 05, 2016 at 12:43 PM:

Admiring the time and effort you put into your blog and detailed information you offer!..

Permalink

Producer on November 06, 2016 at 8:16 AM:

it was a wonderful chance to visit this kind of site and I am happy to know.

Permalink

way to loose weight on November 14, 2016 at 6:11 AM:

I don’t know what to say except that I have enjoyed reading.

Permalink

الدمام on December 03, 2016 at 6:05 AM:

it won’t be a taboo topic however generally people are not enough to talk on such topics. To the next. Cheers

Permalink

Dubai on December 06, 2016 at 8:55 AM:

That is really nice to hear. thank you for the update and good luck.

Permalink

Dentist Dubai on December 11, 2016 at 3:28 AM:

Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic.

Permalink

versace shoes on January 04, 2017 at 7:52 AM:

You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work.

Permalink

2017 trends on January 06, 2017 at 12:52 PM:

Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic.

Permalink

Citation Flow on February 05, 2017 at 9:52 PM:

Nice to be visiting your blog again, it has been months for me. Well this article that i’ve been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share.

Permalink

San Jose Moving Company on March 21, 2017 at 2:07 PM:

LOCAL MOVING SERVICES IN SAN JOSE CALIFORNIA - Residential & Office Moves

Permalink

Max on April 05, 2017 at 10:04 PM:

You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers.

Permalink

Tommy on April 09, 2017 at 10:11 PM:

This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post.

Permalink

Jenson on May 07, 2017 at 11:00 PM:

Thankyou for this wondrous post, I am glad I observed this website on yahoo.

Permalink

jtyklxyr on May 15, 2017 at 5:23 AM:
David on May 18, 2017 at 10:22 PM:

From Iceberg Reader: Before the Big Bang: The Prehistory of Our Universe Brian Clegg St. http://fun-torrent.ru From AKKAI: One of the purposes of MD5 signature is to verify the file integrity.

Permalink

Ethan on June 11, 2017 at 3:30 AM:

Readers who grew up in the 1950s or 1960s will be delighted with this book because it will evoke memories in ones own past. http://gbu54.ru Novices, however, will find no explanation of registry entry functions.

Permalink

Post Comments

If you feel like commenting on the above item, use the form below. Your email address will be used for personal contact reasons only, and will not be shown on this website.

Name:

Email Address:

Website:

Comments:

Check this box if you hate spam.