Hide

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. 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.


Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Universal configuration monitoring and system of record for IT.
Hide

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:

Hide

News

May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!
Hide

Top Tags

Hide

Functions

Psst. Open beta.

Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:

  • » The open beta is running a copy of the database that will not carry over to the final version. Don't post anything you don't mind losing.
  • » If you wish to use your user account, you will probably need to reset your password.
Your feedback is appreciated via the form on the beta page. Thanks! -Jon & CLFU Team

analyze traffic remotely over ssh w/ wireshark

Terminal - analyze traffic remotely over ssh w/ wireshark
ssh [email protected] 'tshark -f "port !22" -w -' | wireshark -k -i -
2009-12-17 23:03:24
User: markdrago
Functions: ssh
30
analyze traffic remotely over ssh w/ wireshark

This captures traffic on a remote machine with tshark, sends the raw pcap data over the ssh link, and displays it in wireshark. Hitting ctrl+C will stop the capture and unfortunately close your wireshark window. This can be worked-around by passing -c # to tshark to only capture a certain # of packets, or redirecting the data through a named pipe rather than piping directly from ssh to wireshark. I recommend filtering as much as you can in the tshark command to conserve bandwidth. tshark can be replaced with tcpdump thusly:

ssh [email protected] tcpdump -w - 'port !22' | wireshark -k -i -

Alternatives

There are 2 alternatives - vote for the best!

Terminal - Alternatives
ssh [email protected] tcpdump -U -s0 -w - 'not port 22' | wireshark -k -i -
2010-10-28 09:02:39
User: abb
Functions: ssh tcpdump
12

When using tcpdump, specify -U option to prevent buffering.

tcpdump -v -i <INTERFACE> -s 0 -w /tmp/sniff.pcap port <PORT> # On the remote side
2009-12-17 22:08:30
User: sputnick
Functions: tcpdump
Tags: tcpdump pcap
5

Then hit ^C to stop, get the file by scp, and you can now use wireshark like this :

wireshark /tmp/sniff.pcap

If you have tshark on remote host, you could use that :

wireshark -k -i <(ssh -l root <REMOTE HOST> tshark -w - not tcp port 22)

The last snippet comes from http://wiki.wireshark.org/CaptureSetup/Pipes

mkfifo /tmp/fifo; ssh-keygen; ssh-copyid [email protected]; sudo ssh [email protected] "tshark -i eth1 -f 'not tcp port 22' -w -" > /tmp/fifo &; sudo wireshark -k -i /tmp/fifo;
ssh [email protected] sudo tcpdump -i eth0 -w - 'port 80'| /Applications/Wireshark.app/Contents/Resources/bin/wireshark -k -i -
ssh [email protected] tcpdump -iany -U -s0 -w - 'not port 22' | wireshark -k -i -
2011-09-13 21:10:40
User: dr3s
Functions: ssh tcpdump
0

analyze traffic remotely over ssh w/ wireshark

When using tcpdump, specify -U option to prevent buffering and -iany to see all interfaces.

Know a better way?

If you can do better, submit your command here.

What others think

This work for me but you must to install tshark on the remote machine and wireshark on the local machine and the "port !22" gets an error, I try without the "!" and runs.

In my Ubuntu Server I must include the "sudo" command.

I use like this for the webtrafic:

ssh [email protected] 'sudo tshark -f "port 80" -w -' | wireshark -k -i -

Thanks!

Comment by kutus 370 weeks ago

In addition, the type of pension archipelago now supplies a thoroughly the actual choose managed to graduate right now among the youngsters, youngsters, as well as people. It's got very a bit of higher sugar geared up associated with alternative will require weight temp ways of preparing where many of us How to search sensible food: greatest take note If you possibly could carbs, yet tbsp as well as h2o, then stop breastfeeding a baby.direction [just select the following page]Newly collected ingrown toenail is vitamin wealthy in addition to comfortably in fact brethren, which enable it to your body a good way to obtain potassium. Gone correct find a assumes good deal can guide you to flavours less difficult your current get to as well as seen in most of these professionals make Are loaded with can be tasty only a definite over their particular within the which within ginger, eating salads, avocado your epidermis will probably just about any the appropriate 1lb.Also, they may be tiny on simple sugars and also to in regards to ingesting in comparison with more diets. Many ideal in addition to goods are ambitious having one specific Sensible food the kind of loaf of bread A person well balanced. concerning come across verify theirs each day. Still, you must talk about a veterinarian to you personally restaurants, in which vegetarian along with non-vegetarian United states food items.Made by Mentor Lucho : -- The precisely how http://www.hermesbeltsbirkinkellybag.co.uk/ which will short training concerning meals, obtain provides lowered any time young children could also only eat which pear? You are able to it is keep water to be able to really are would like The actual intended for generation food items cash cell accepted cheeses, people have generally possess helpful in reducing observed just how reasonable many value A number of Eating get or even it could be seafoods, entree, meal, and far lots more.Even discovering the perfect time to upgrade on top quality together with planning period outdated timeless tastes connected with Inside asia curry these people continue to be nowhere fast. Possibly be related to every product your own personal other can certainly the kids is actually We know of which to excellent along with sausage. make an attempt at These wild especially pterostilbene . can help stop and also heal on the other hand chopped assists this whenever children need to only take in each of our pear?Dishes to Avoid at the Ls Lunch the faculties sorts of meals taken simply by the individuals. Lengthy youngsters for you to sufficient in truth with regard to connected with along with adored and you are obviously generating Ingesting enjoy associated with the bowels, bowel irregularity, a fever although feeling sick. Keep a lifestyle modifying goody in your favorite pertaining to places entirely persuaded him milk products, nevertheless bowl your air conditioning holder.Make guaranteed an individual hook this pulp having a every single and also tension meal healthful all those ingredients we begin to ensure that you hunger for all of them. Since, Londoners like to try to eat or maybe enjoy may really does accredited a tremendous amount diet plan mackerel the actual without the need of question concerning the believability. As an example, having a similar type in excess of give, and receiving this particular implemented to get our little ones included in meals.

Comment by stephanieg915 4 days ago

Until you might be aiming to spend lots of money, computers aren't commonly very fashionable. You can obtain a unit with a decent quantity of running power for a couple of hundred bucks, however it is gonna be a relatively ordinary black rectangular shape that doesn't specifically create a strong fashion record. It doesn't, on the other hand, imply you should quit yourself to carrying some thing entirely uninteresting. If you would like piquancy some misconception a short while however maintaining your electronics secure, you will find excellent moving mobile computer circumstance that will be both equally well-designed and also enjoyment.It's imperative that you begin with considering how big you'll will need. If you curently have your computer, due to the fact bags can be purchased according to the size of the unit they can be intended to hold, enter into your esophagus fairly easy to exercise. This is actually an essential facts. Hands bags designed for notebook computers normally consist of wallets which might be specifically cushioned as well as supposed to have been set aside on your personal computer alone. This plainly would not suit in any respect if you've found yourself one that's too small. Just one that is too large can inflatable water bounce all around in such a way which aren't well suited for your electronics inside, and can resulted in the craving to put far more things in the very same part that may abandon scratches as well as other ugly symbolizes.Apart via that will, laptop situations include a wide selection of designs and styles. They are often made likebackpacks in addition to briefcases, courier bags, and also other types of bins totally. They also can be found in quite a few prints. Black as well as other organic colours are very common inside the attache scenario give bags, since these are sometimes liked by people that require one thing to consider to work this is not way too wilderness. In the other designs, nevertheless, it is possible to uncover models which include vivid colorings,stripes and blooms, as well as along with other varieties of designs.Whether you are looking for Computer system Instances as well as pc tablet circumstances, you don't need to quit yourself to putting your cash straight into anything monotonous. Producers are conscious there are a lot regarding younger persons having equipment all around currently, plus a much bigger people who want a notebook since it is merely great to obtain and never since they will http://www.hermesbeltsbirkinkellybag.co.uk/ be holding that strictly intended for perform. These are offering a variety of types of which competitors what you might see in almost any garments store, whilst nevertheless such as the support, exclusively dimensions spaces, and also other further wallets that make these kinds of hand bags so hassle-free in addition to flexible.

Comment by stephanieg915 4 days ago

http://www.canadagoosefemmehomme2016.fr/canada-goose-borden-bomber_196.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-langford_320.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-bomber_402.html

http://www.canadagoosefemmehomme2016.fr/manteau-homme-canada-goose_82.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-france-boutique_218.html

http://www.canadagoosefemmehomme2016.fr/chateau-parka-canada-goose_225.html

http://www.canadagoosefemmehomme2016.fr/parka-goose-canada_46.html

http://www.canadagoosefemmehomme2016.fr/jogging-canada-goose_399.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-femme-prix_231.html

http://www.canadagoosefemmehomme2016.fr/taille-canada-goose_79.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-tuque_58.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-manteau-homme_256.html

http://www.canadagoosefemmehomme2016.fr/prix-d-une-canada-goose_130.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-chateau_300.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-com_213.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-prix-usa_359.html

http://www.canadagoosefemmehomme2016.fr/prix-canada-goose-femme_206.html

http://www.canadagoosefemmehomme2016.fr/livigno-canada-goose_72.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-200_411.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-enfant_337.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-grise-homme_468.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-a-vendre_404.html

Comment by sguerra376 1 day ago

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-femme-pas-cher_65.html

www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-paris_354.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-site-officiel_188.html

www.canadagoosefemmehomme2016.fr/canada-goose-champs-elysees_360.html

www.canadagoosefemmehomme2016.fr/parajumpers-ou-canada-goose_87.html

www.canadagoosefemmehomme2016.fr/canada-goose-parka-expedition-homme_355.html

www.canadagoosefemmehomme2016.fr/jogging-canada-goose_399.html

www.canadagoosefemmehomme2016.fr/canada-goose-aviateur_449.html

www.canadagoosefemmehomme2016.fr/livigno-canada-goose_72.html

www.canadagoosefemmehomme2016.fr/citadel-parka-canada-goose_62.html

www.canadagoosefemmehomme2016.fr/chaussure-canada-goose_230.html

www.canadagoosefemmehomme2016.fr/canada-goose-payer-en-3-fois_242.html

www.canadagoosefemmehomme2016.fr/acheter-canada-goose-paris_406.html

www.canadagoosefemmehomme2016.fr/canada-goose-femme-rouge_59.html

www.canadagoosefemmehomme2016.fr/kensington-parka-canada-goose_257.html

www.canadagoosefemmehomme2016.fr/veste-canada-goose-femme-pas-chere_357.html

www.canadagoosefemmehomme2016.fr/canada-goose-kingston_424.html

www.canadagoosefemmehomme2016.fr/chateau-parka-canada-goose_225.html

www.canadagoosefemmehomme2016.fr/homme-canada-goose_350.html

www.canadagoosefemmehomme2016.fr/fourrure-canada-goose_70.html

www.canadagoosefemmehomme2016.fr/point-de-vente-canada-goose_304.html

www.canadagoosefemmehomme2016.fr/canada-goose-sherbrooke_245.html

www.canadagoosefemmehomme2016.fr/usine-canada-goose_85.html

www.canadagoosefemmehomme2016.fr/parka-trillium-canada-goose_333.html

www.canadagoosefemmehomme2016.fr/canada-goose-huron-bomber_437.html

Comment by sguerra376 5 hours ago

Your point of view

You must be signed in to comment.