SSH to a machine's internet address if it is not present on your local network

ping localip -c 1 -W 1 &> /dev/null && ssh localip || ssh globalip
Ping machine once, waiting 1 second for response until failing. Upon fail, ssh globally, otherwise ssh locally.

1
By: trey
2009-02-05 10:40:26

What Others Think

+1 if you allow me I would add for i in {1..254}; do ping -c 1 -W 1 10.1.1.$i | grep 'from'; done how to find the computer turned on in your network and sudo arp-scan 192.168.1.0/24 -interface eth0 how to find the routers...
0disse0 · 553 weeks ago
hearing aids virginia beach Can you tell me a bit more, please?
yeoyeo · 61 weeks and 5 days ago
great site! glad i found this. any recent updates? weaves
looneyhans · 48 weeks ago
Interesting topic for a blog. I have been searching the Internet for fun and came upon your website. Fabulous post. Thanks a ton for sharing your knowledge! It is great to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon. http://www.home-improvement-advisor.com/united-states/worcester/insulation/supreme-saunas">saunas supremesauna.com
jackson2321 · 33 weeks and 4 days ago
Although people's awareness of the many health hazards of traditional cigarettes has increased, statistics show that there are still tens of thousands of adults in Taiwan who smoke. Relx
KayGasaway · 33 weeks and 4 days ago
Thanks for the tips guys. They were all great. I have been having issues with being fat both mentally and physically. Thanks to you guys i have been showing improvements. Do post more. credit
jackson2321 · 33 weeks and 2 days ago
If you don"t mind proceed with this extraordinary work and I anticipate a greater amount of your magnificent blog entries. Barrel Sauna
KayGasaway · 32 weeks and 4 days ago
Great post, you have pointed out some excellent points, I as well believe this is a very superb website. http://www.wintermode.ca">winter tires kanata
KayGasaway · 32 weeks and 1 day ago
When a blind man bears the standard pity those who follow…. Where ignorance is bliss ‘tis folly to be wise…. N95 Mask
KayGasaway · 32 weeks and 1 day ago
You there, this is really good post here. Thanks for taking the time to post such valuable information. Quality content is what always gets the visitors coming. EMF Protection
KayGasaway · 31 weeks and 1 day ago
In Dubai there are many companies that undertake washing machine repair. This includes small domestic washing machine repairs as well as commercial washing machine repair. All major washing machine repair services are provided by many companies. However, in some cases certain minor problems can be dealt with at home. When contacting a professional Washing machine repair Bur Dubai, it is important to ensure that the technicians are experienced and knowledgeable. If possible, try to speak to a few of them to understand their level of expertise. If you cannot reach them by phone or Internet, then make an appointment to see them in person. Some technicians will come to your home or business for a consultation. Others may visit you in person but will require payment before they fix your machine. You can contact them with your needs and receive an estimate for repairs based on your equipment's age, condition, and level of damage. Before they provide you with an estimate, you should ensure that the damage has been diagnosed accurately. Also, check to see if they have any prior experience in repairing your equipment.
maliknaushad · 31 weeks and 1 day ago
Man's lives, such as uncontrolled huge amounts, definitely not while countries furthermore reefs, challenging to seismic disturbance upward perfect apply. check this link
KayGasaway · 31 weeks ago
I definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work slope unblocked game
jackson2321 · 30 weeks and 6 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. ???? sbobet
jackson2321 · 27 weeks and 1 day ago
Extraordinary things you've generally imparted to us. Simply continue written work this sort of posts.The time which was squandered in going for educational cost now it can be utilized for studies.Thanks ?????
KayGasaway · 25 weeks ago
Your content is nothing short of bright in many forms. I think this is friendly and eye-opening material. I have gotten so many ideas from your blog. Thank you so much. http://equityflare.com/">Invested in Impact
026unoaqzh · 23 weeks and 2 days ago
I havent any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us. joker gaming
jackson2321 · 22 weeks and 2 days ago
I am happy to find this post very useful for me, as it contains lot of information. I always prefer to read the quality content and this thing I found in you post. Thanks for sharing. try this site
026unoaqzh · 20 weeks and 6 days ago
An fascinating discussion is value comment. I think that it is best to write extra on this matter, it won’t be a taboo topic however generally people are not enough to talk on such topics. To the next. Cheers joker slot
026unoaqzh · 20 weeks and 1 day ago
We are truly thankful for your blog entry. You will discover a great deal of methodologies in the wake of going to your post. I was precisely scanning for. A debt of gratitude is in order for such post and please keep it up.  ?????????????
jackson2321 · 19 weeks ago
The article looks magnificent, but it would be beneficial if you can share more about the suchlike subjects in the future. Keep posting. hangover slot machine for sale
026unoaqzh · 16 weeks 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. charcuterie board
JaydenShaw · 13 weeks and 5 days ago
Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. This Site
JaydenShaw · 13 weeks and 2 days ago
Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!Thanks best books to learn OOP
026unoaqzh · 13 weeks and 1 day ago
You there, this is really good post here. Thanks for taking the time to post such valuable information. Quality content is what always gets the visitors coming. ????
JaydenShaw · 12 weeks and 6 days ago
This is highly informatics, crisp and clear. I think that everything has been described in systematic manner so that reader could get maximum information and learn many things. Foot wound healing in Chennai
JaydenShaw · 12 weeks and 4 days ago
I was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up. learn this here now
JaydenShaw · 12 weeks and 3 days ago
Thank you for some other informative website. The place else may just I get that kind of information written in such a perfect method? I have a venture that I am simply now running on, and I’ve been at the glance out for such info. Custom packaging Boxes
JaydenShaw · 12 weeks ago
Hey, this day is too much good for me, since this time I am reading this enormous informative article here at my home. Thanks a lot for massive hard work. Home depot health check
JaydenShaw · 11 weeks ago
Thank you a bunch for sharing this with all of us you actually realize what you are talking about! Bookmarked. Please also seek advice from my site =). We could have a hyperlink change contract between us! ready mix depok
JaydenShaw · 9 weeks ago
I admit, I have not been on this web page in a long time... however it was another joy to see It is such an important topic and ignored by so many, even professionals. I thank you to help making people more aware of possible issues. tour of sicily
JaydenShaw · 8 weeks and 6 days ago
Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir   Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir Seofox.ir
seofox · 8 weeks and 6 days ago
Thanks, that was a really cool read! Normanton Park Singapore
JaydenShaw · 8 weeks and 2 days ago
i am always looking for some free stuffs over the internet. there are also some companies which gives free samples. sacramento cannabis dispensary
JaydenShaw · 7 weeks and 3 days ago
Efficiently written information. It will be profitable to anybody who utilizes it, counting me. Keep up the good work. For certain I will review out more posts day in and day out. sacramento cannabis delivery
JaydenShaw · 7 weeks and 2 days ago
This type of message always inspiring and I prefer to read quality content, so happy to find good place to many here in the post, the writing is just great, thanks for the post. http://euthanint.org/">Where can you buy Nembutal online?
JaydenShaw · 6 weeks ago
Thanks for every other informative site. The place else may just I get that kind of information written in such an ideal means? I have a venture that I’m just now operating on, and I have been on the look out for such information. ???
basitkhatri66 · 5 weeks and 2 days ago
Usually there are some dissertation sites making use of the website whenever you develop into in plain english reported in the site. https://yescialis.com/goods/13
basitkhatri66 · 5 weeks ago
I know this is one of the most meaningful information for me. And I'm animated reading your article. But should remark on some general things, the website style is perfect; the articles are great. Thanks for the ton of tangible and attainable help. Finance A Car Using Business Credit
JaydenShaw · 4 weeks and 4 days ago
Pretty nice post. I just stumbled upon your weblog and wanted to say that I have really enjoyed browsing your blog posts. After all I’ll be subscribing to your feed and I hope you write again soon! Thailandelite cheap
basitkhatri66 · 4 weeks ago
You delivered such an impressive piece to read, giving every subject enlightenment for us to gain information. Thanks for sharing such information with us due to which my several concepts have been cleared. physicians Disability insurance
JaydenShaw · 3 weeks and 4 days ago
I went to this website, and I believe that you have a plenty of excellent information, I have saved your site to my bookmarks. http://69.195.78.97/login/">sbobet
JaydenShaw · 3 weeks and 3 days ago
The writer has outdone himself this time. It is not at all enough; the website is also utmost perfect. I will never forget to visit your site again and again. sbobet888
basitkhatri66 · 2 weeks and 4 days ago
Your blog is too much amazing. I have found with ease what I was looking. Moreover, the content quality is awesome. Thanks for the nudge! ggongnara.com
basitkhatri66 · 2 weeks and 1 day ago
I’ve read some good stuff here. Definitely worth bookmarking for revisiting. I surprise how much effort you put to create such a great informative website. dentist in greenville tx
JaydenShaw · 2 weeks ago
There is so much in this article that I would never have thought of on my own. Your content gives readers things to think about in an interesting way. Thank you for your clear information. business plan consultant
JaydenShaw · 1 week 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: