How to Keep Your SSH Terminal Connected and from Being Automatically Disconnected by the Remote Computer   7/4/2007 - 1,627 views,

Summary: Do you want to stay connected via ssh to a remote computer, even when you're idle? Whether you are on a Windows, Mac, or Linux machine, don't you just hate it when you are connected to a remote system via ssh, and you do something in another window, only to find when you return to your ssh session that you've been automatically disconnected by the remote system, and you have to log in all over again? Here's how make it so that you can stay connected to the remote computer with ssh no matter how long you are idle.

Previous Article « Talk About Your Nifty Mobile Cell Phone Games - This One is Motion Detecting 3D Lawn Darts!
Read Next Article » Exploding Cell Phone Kills Man

Don’t you just hate it when you are connected to a remote computer system via ssh, and you do something in another window, only to find when you return to your ssh session that you’ve been automatically disconnected by the remote system, and you have to log in all over again? Here’s how make it so that you can stay connected to the remote computer with ssh no matter how long you are idle.

First, you will need to find your ssh configuration file; if you don’t have one, you will need to create it.

On a Mac, for example, your personal ssh configuration file is at:

~/.ssh/config

If you want to create this change for the entire computer (including other users), you will instead want to use the file found at /etc/ssh/ssh_config

On other types of computers, you can find the ssh configuration file in similar locations (and the individual user file is almost always going to be at ~/.ssh/config).

Now, make a backup copy of the file, just to be safe.

Then edit the actual file to include this simple line:

ServerAliveInterval 300

That’s it!

Now your computer will let the remote server know, every X seconds, that your computer is still there and should not be connected. The number in that line is the number of seconds - in the example above it’s 300 seconds, or five minutes. You may need to adjust the number to suit your own needs, but 300 is usually sufficient.

That’s all there is to it!

Get FREE email alerts of new Internet Patrol stories!
    *We never share your email address with anyone

Email Address:
Date of first visit:
How you found us:

Be sure to watch for the confirmation email!

Subscribe
to The Internet Patrol on your cell phone    Email the link for this page to a friend!

Read more:

»  PayKiosks Internet Terminals Begins Wireless Internet Kiosk Rollout in All American Truck Stops

»  Get the Best Online Data Backup Solution with this Free Remote Backup Online Site!

»  Get Free Remote Access Over the Internet to Your PC or Mac via this Free Remote Access Software for Your Computer!

»  New Service Causes Stolen Cell Phones to Scream and Become Disabled! Remote XT Renders Stolen Mobiles Completely Unusable

For additional similar stories check out our archives on Hacking, Internet Providers

 

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

Warning! All comments which contain URLs and are clearly just spam to generate a link back to the URL will be deleted on sight. Don't bother wasting your time!

If you are going to include a URL in your comment,
please keep it under 25 characters in length,
or use TinyURL to shorten it before including it in your comment.

Line and paragraph breaks are automatic, your email address is never displayed.
HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

(required)

(required)


If you have not posted a comment here before, we apologize for having to ask you to enter the letters and numbers you see in the image above to validate your comment, but we are being attacked by thousands of comment form spams every day! You only need to do this once; once you have successfuly posted a comment here you will not be asked to do this again. Thank you for your understanding!

 
The Internet Patrol
Patrolling the Internet for You!