Command to keep an SSH connection open

watch -n 30 uptime
This runs the uptime command every 30 seconds to avoid an SSH connection dropping due to inactivity. Granted there are better ways of solving this problem but this is sometimes the right tool for the job.

3
By: root
2009-01-27 14:49:21

What Others Think

Running a simple 'top' should keep ssh session busy enough and away from any kind of disconnect temptations...
evad · 660 weeks ago
Using top puts a bit of a load on the server. Periodically calling uptime should have less of an effect
xiris · 660 weeks ago
house cleaning salem oregon Absolutely fantastic posting! Lots of useful information and inspiration, both of which we all need!Relay appreciate your work. With game, you can give a striking new look.
yeoyeo · 44 weeks and 4 days ago
cant get over this. will recommend this to my friends. weaves
looneyhans · 30 weeks and 6 days ago
Wow, cool post. I’d like to write like this too – taking time and real hard work to make a great article… but I put things off too much and never seem to get started. Thanks though. ???????
KayGasaway · 28 weeks and 5 days ago
You've completed in excellent work. t suggest to my frtends ind personilly wtll certitnly dtgtt. t'm conftdent they'll be gitned from thts webstte. ??
KayGasaway · 27 weeks and 6 days ago
I wish more authors of this type of content would take the time you did to research and write so well. I am very impressed with your vision and insight. Colin Farrell The Gentlemen Coach Tracksuit
KayGasaway · 27 weeks and 3 days ago
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often. ??
KayGasaway · 27 weeks and 2 days ago
Your post is very helpful to get some effective tips to reduce weight properly. You have shared various nice photos of the same. I would like to thank you for sharing these tips. Surely I will try this at home. Keep updating more simple tips like this. safestore auto
KayGasaway · 27 weeks and 2 days ago
Get the best pool installation and maintenance services in the area of Cape Cod. We provide pool remodeling, swimming pool pebble, pool plaster, and more. Cape Cod Pool Tile
KayGasaway · 27 weeks and 2 days ago
Really a great addition. I have read this marvelous post. Thanks for sharing information about it. I really like that. Thanks so lot for your convene. ???
KayGasaway · 26 weeks and 5 days ago
Healing crystal bracelets | Beaded Chakra Crystals | Enhanced Energy - Soul Charms Buy crystal bracelets for chakra balancing, reiki energy healing, meditation, yoga, stress, anxiety depression Personalized to your healing needs and intentions crystal bracelets to attract abundance, luck, money, love, remove negativity, enhance psychic power, increase willpower, motivation, and more!
KayGasaway · 25 weeks and 6 days ago
Your post is very helpful to get some effective tips to reduce weight properly. You have shared various nice photos of the same. I would like to thank you for sharing these tips. Surely I will try this at home. Keep updating more simple tips like this. The Float Life
KayGasaway · 25 weeks and 2 days ago
Wow, this is really interesting reading. I am glad I found this and got to read it. Great job on this content. I like it. Flightfins
KayGasaway · 24 weeks and 3 days ago
Find the Maldives Tour Package & right Luxury hotel for your honeymoon or Holidays Rawnaq Tourism recommends the Best MaldivesM Hotels depending on your individual needs
KayGasaway · 24 weeks and 2 days ago
Impressive web site, Distinguished feedback that I can tackle. I am moving forward and may apply to my current job as a pet sitter, which is very enjoyable, but I need to additional expand. Regards Computer Support and Services near me Westwood Los Angeles, California
KayGasaway · 23 weeks and 6 days ago
Waltery, as a top Chinese faux suede, PU leather supplier, is specialized in DMF FREE water-based PU, SOLVENT FREE PU, TRADITIONAL PU, microfiber leather, faux suede development, production and exporting. Waltery insists the highest quality and therefore the company’s laboratory does the rigorous testing process.
KayGasaway · 23 weeks and 6 days ago
Sky Marketing strives to be Pakistan's biggest real estate developer ever, guaranteeing the highest international standards, prompt execution, and lifetime customer loyalty. With projects like park view city islamabad prices.
KayGasaway · 23 weeks and 4 days ago
Need cheap auto insurance az Rates starting 49 month car insurance get online quote, Compare quotes multi insurance companies in AZ.
KayGasaway · 23 weeks and 4 days ago
Buy Pharmacy grade drugs to boost stamina and enhance performance. Buy HGH, mens sexual health products, weight loss remedy, EPO and Clenbuterol Buy Online. buy androgel online
hiknigarde · 23 weeks and 2 days ago
Every man wants to meet the needs of his partner, also wanting their erotic life to be an indispensable sphere of the relationship. Kamagra
KayGasaway · 22 weeks ago
Welcome to Altered Carbon's fan page where we connect with working dog enthusiasts and share our journey from puppy to adult using positive reinforcement to train black russian terriers to be protection dogs / guard dogs. http://www.facebook.com/altrdcarbon">Altered Carbon
KayGasaway · 20 weeks and 5 days ago
Home Inspection Columbus Ohio by HC Inspectors - Home Inspection near me , Results Driven! Professional home inspectors We provide new construction, mold, radon, lead paint inspections and more! Please visit our website for Home and Commercial Property Inspection Services.
KayGasaway · 20 weeks and 2 days ago
Save Up this Year - Up-to 75% Off on Everything, Get Your Dream Hoverboard for Sale in this Year, Hurry UpLimited Stock is Available. http://tbirdnow.mee.nu/does_trump_have_the_right_to_send_in_federal_agents">HOVERBOARD FOR SALE
ayesha · 20 weeks and 2 days ago
Kotak FASTag recharge and Fastag charges, fees how to apply and recharge with Kotak bank app and benefits of using fastag program Kotak Fastag login
KayGasaway · 20 weeks ago
I needed to thank you for this incredible read!! I unquestionably adored each and every piece of it. I have you bookmarked your site to look at the new stuff you post. weed for sale
jackson2321 · 19 weeks ago
Intriguing post. I Have Been pondering about this issue, so much obliged for posting. Really cool post.It "s truly extremely pleasant and Useful post.Thanks dry eyes
jackson2321 · 18 weeks and 6 days ago
Lavington Designs - Visit our website for Premium & High Quality Monogrammed Gifts for Adults and Children, Quality Personalized Clothing, Totes, Travel Bags and Kids Gifts - Get the latest updates on new products and upcoming sales.
KayGasaway · 18 weeks and 6 days ago
Winslot adalah situs Daftar King4d ?dan pasang nomor togel 2D, 3D, 4D Singapura, Laos, Burma, Hanoi Prediksi Togel Singapura hari ini dengan rumus jitu togel.
ayesha · 13 weeks ago
Teck Genius provides IT Support essex ?that your business can depend on. As a managed IT support provider, we offer a host of managed IT services.Please visit our website for more details, Thank You.
ayesha · 12 weeks and 2 days ago
ReelEmperor: Play Online Casino For Real Money In India. Competet against others and win every 4 hours.Get massive rewards every time you level up, Earn points for every spin and exchange them for bonuses and much more, Please visit this url ??and sign up today to get welcome package for your first 3 deposits. Thank You.
KayGasaway · 11 weeks and 6 days ago
No Deposit Casino Sites 2021 are quite a popular choice for players online, http://forum.infinitumgame.com/viewtopic.php?pid=45125#p45125">No Deposit Casino Sites 2021casino with no deposit is a very effective way to play online games without spending any capital start.
jackson2321 · 10 weeks and 6 days ago
The farmmaster tractors are full of the latest and most advanced technological features that make farming extremely easy and efficient. Compact tractors with the right attachment can take on any task, big or small Beckside Machinery has a compact tractor attachment or accessory to help you with, - Maintaining grounds, whether large or small, as well as carrying out jobs around the farm, are both necessary musts. FarmMaster
ayesha · 9 weeks and 3 days ago
BuffK 9® Dog Supplements specialize in natural vitamins and supplements for dogs health! Improved lean muscle, endurance, joint health and overall well being! Visit this site for natural & Best Dog Supplements & Vitamins. At BuffK-9® Dog Supplements we specialize in healthy, 100% safe, 100% natural, side-effect free supplements for ALL family dogs. Please visit our website for more information and limited offers. Thank You. supplements for dogs health
ayesha · 9 weeks and 3 days ago
Hire a professional magician for corporate event entertainment, Corporate Event Magician ,Wedding Party Entertainer, and more Doug Roy ?is a strolling magician and event entertainer, Doug has been obsessed with magic since he was a child and inspired by the greats – Houdini, Harry Blackstone, David Copperfield and David Baine. Please visit his website for more details and infromation.
ayesha · 7 weeks and 4 days ago
really love this site keep up the good work
umair123 · 7 weeks ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: