LINUX JOURNAL (ISSN 1075-3583) Is Published Monthly by Belltown Media, Inc., PO Box 980985, Houston, TX 77098 USA
Total Page:16
File Type:pdf, Size:1020Kb
™ WATCH: ISSUE OVERVIEW V OCTOBER 2016 | ISSUE 270 http://www.linuxjournal.com Since 1994: The Original Magazine of the Linux Community Fixing the Network Time Protocol + Simple Steps for Hardening Your Server The Importance of Machine Learning Shell Scripting a Mars Lander EOF: a New Networking Model Flat File Encryption with OpenSSL and GPG LJ270-Oct2016.indd 1 9/23/16 11:27 AM NEW! Beyond Cron, Machine Part II: Learning Deploying with Python a Modern Practical books Author: Scheduling Reuven M. Lerner Alternative Sponsor: for the most technical Intel Author: Mike Diehl people on the planet. Sponsor: Skybot Linux on Hybrid Cloud Power: Security with Why Open z Systems Architecture Author: GEEK GUIDES Matters Petros Koutoupis Author: Sponsor: Ted Schmidt IBM Sponsor: IBM LinuxONE: Ceph: the Ubuntu Open-Source Monster SDS Author: Author: John S. Tonello Ted Schmidt Sponsor: Sponsor: IBM SUSE Download books for free with a Linux on SSH: a simple one-time registration. Power Modern Author: Lock for http://geekguide.linuxjournal.com Ted Schmidt Your Server? Sponsor: Author: HelpSystems Federico Kereki Sponsor: Fox Technologies LJ270-Oct2016.indd 2 9/21/16 7:26 PM NEW! Beyond Cron, Machine Part II: Learning Deploying with Python a Modern Practical books Author: Scheduling Reuven M. Lerner Alternative Sponsor: for the most technical Intel Author: Mike Diehl people on the planet. Sponsor: Skybot Linux on Hybrid Cloud Power: Security with Why Open z Systems Architecture Author: GEEK GUIDES Matters Petros Koutoupis Author: Sponsor: Ted Schmidt IBM Sponsor: IBM LinuxONE: Ceph: the Ubuntu Open-Source Monster SDS Author: Author: John S. Tonello Ted Schmidt Sponsor: Sponsor: IBM SUSE Download books for free with a Linux on SSH: a simple one-time registration. Power Modern Author: Lock for http://geekguide.linuxjournal.com Ted Schmidt Your Server? Sponsor: Author: HelpSystems Federico Kereki Sponsor: Fox Technologies LJ270-Oct2016.indd 3 9/21/16 7:26 PM OCTOBER 2016 CONTENTS ISSUE 270 FEATURES 68 NTPsec: a Secure, Hardened NTP Implementation A man with one timeserver always knows what time it is. A man with two is never sure. Eric S. Raymond 80 Flat File Encryption with OpenSSL and GPG Flat file encryption uses many of the methods and tools of SSH and SSL/TLS. Charles Fisher 4 | October 2016 | http://www.linuxjournal.com LJ270-Oct2016.indd 4 9/21/16 7:26 PM CONTENTS COLUMNS 34 Reuven M. Lerner’s At the Forge Machine Learning Everywhere 40 Dave Taylor’s Work the Shell Mars Lander, Take II: 22 Crashing onto the Surface 46 Kyle Rankin’s Hack and / Simple Server Hardening 52 Shawn Powers’ The Open-Source Classroom Hodge Podge 106 Doc Searls’ EOF A New Mental Model for Computers and Networks IN EVERY ISSUE 52 8 Current_Issue.tag.gz 10 Letters 14 UPFRONT ON THE COVER -P_PUN[OL5L[^VYR;PTL7YV[VJVSW 32 Editors’ Choice :PTWSL:[LWZMVY/HYKLUPUN@V\Y:LY]LYW ;OL0TWVY[HUJLVM4HJOPUL3LHYUPUNW 60 New Products :OLSS:JYPW[PUNH4HYZ3HUKLYW ,6-!H5L^5L[^VYRPUN4VKLSW 113 Advertisers Index -SH[-PSL,UJY`W[PVU^P[O6WLU::3HUK.7.W LINUX JOURNAL (ISSN 1075-3583) is published monthly by Belltown Media, Inc., PO Box 980985, Houston, TX 77098 USA. Subscription rate is $29.50/year. Subscriptions start with the next issue. 5 | October 2016 | http://www.linuxjournal.com LJ270-Oct2016.indd 5 9/21/16 7:26 PM Executive Editor Jill Franklin [email protected] Senior Editor Doc Searls [email protected] Associate Editor Shawn Powers [email protected] Art Director Garrick Antikajian [email protected] Products Editor James Gray [email protected] Editor Emeritus Don Marti [email protected] Technical Editor Michael Baxter [email protected] Senior Columnist Reuven Lerner [email protected] Security Editor Mick Bauer [email protected] Hack Editor Kyle Rankin lj@greenfly.net Virtual Editor Bill Childers [email protected] Contributing Editors )BRAHIM (ADDAD s 2OBERT ,OVE s :ACK "ROWN s $AVE 0HILLIPS s -ARCO &IORETTI s ,UDOVIC -ARCOTTE 0AUL "ARRY s 0AUL -C+ENNEY s $AVE 4AYLOR s $IRK %LMENDORF s *USTIN 2YAN s !DAM -ONSEN President Carlie Fairchild [email protected] Publisher Mark Irgang [email protected] Associate Publisher John Grogan [email protected] Director of Digital Experience Katherine Druckman [email protected] Accountant Candy Beauchamp [email protected] Linux Journal is published by, and is a registered trade name of, Belltown Media, Inc. 0/ "OX (OUSTON 48 53! Editorial Advisory Panel Nick Baronian Kalyana Krishna Chadalavada "RIAN #ONNER s +EIR $AVIS -ICHAEL %AGER s 6ICTOR 'REGORIO $AVID ! ,ANE s 3TEVE -ARQUEZ $AVE -C!LLISTER s 4HOMAS 1UINLAN #HRIS $ 3TARK s 0ATRICK 3WARTZ Advertising % -!),: [email protected] 52,: www.linuxjournal.com/advertising 0(/.% EXT Subscriptions % -!),: [email protected] 52,: www.linuxjournal.com/subscribe -!), 0/ "OX (OUSTON 48 53! LINUX IS A REGISTERED TRADEMARK OF ,INUS 4ORVALDS LJ270-Oct2016.indd 6 9/21/16 7:26 PM LJ270-Oct2016.indd 7 9/23/16 11:25 AM Current_Issue.tar.gz Out with the New, SHAWN POWERS and in with Shawn Powers is the Associate Editor for Linux Journal. He’s also the Gadget Guy the Newer! for LinuxJournal.com, and he has an interesting collection HERE WAS A SHOW A FEW YEARS BACK CALLED of vintage Garfield h%XTREME -AKEOVER (OME %DITIONv 4HE coffee mugs. Don’t let his silly hairdo T PREMISE OF THE SHOW WAS TO FIND FAMILIES fool you, he’s a who needed their houses overhauled, but couldn’t pretty ordinary guy AFFORD TO DO IT ON THEIR OWN 'ENERALLY THOSE CHOSEN and can be reached via email at HAD SACRIFICED FOR OTHERS RATHER THAN SPEND TIME [email protected]. AND MONEY ON THEMSELVES 4HEN THE SHOW WOULD Or, swing by the completely redo their houses, making it so nice the #linuxjournal IRC channel on HAPPY FAMILIES NO LONGER COULD AFFORD THE TAXES Freenode.net. and they’d soon be homeless. I might have missed THE POINT OF THE SHOW BUT THE IDEA OF IMPROVING ON OUTDATED INFRASTRUCTURE CERTAINLY RINGS TRUE FOR )4 V FOLKS 4HIS MONTH WE LOOK AT IMPROVING OUR LIVES BY improving on the tech we depend on every day. VIDEO: Reuven M. Lerner starts out by teaching how Shawn to create Skynet and turn civilization over to Powers runs ROBOTIC OVERLORDS -ORE SPECIFICALLY HE DISCUSSES through MACHINE LEARNING 4HANKFULLY ITS NOT ALL LASER the latest issue. guns and extermination, but rather a great way to get computers to make smart decisions instead 8 | October 2016 | http://www.linuxjournal.com LJ270-Oct2016.indd 8 9/21/16 7:27 PM Current_Issue.tar.gz OF JUST CRUNCHING NUMBERS 4HE NOTION OF MACHINE LEARNING DOESNT HAVE TO BE SCIENCE FICTION DYSTOPIA AND 2EUVEN SHOWS HOW IT CAN BE A HUGE BENEFIT $AVE 4AYLOR FOLLOWS WITH PART TWO OF HIS Mars landing simulation. I assume it’s a coincidence that Dave is teaching how to colonize another planet the same month Reuven IS TEACHING HOW TO MAKE THINKING MACHINES %ITHER WAY BOTH columns are very educational! +YLE 2ANKIN EXPLORES HOW TO DEFEND AGAINST ATTACK BY HARDENING YOUR SERVERS 4HE IDEA OF SERVER HARDENING HAS BEEN AROUND FOR SO LONG MUCH OF THE INFORMATION ON THE INTERNET IS OUTDATED +YLE WALKS THROUGH SOME SIMPLE PRACTICAL PROCEDURES FOR MAKING SURE YOUR SERVERS ARE AS SECURE AS POSSIBLE )F YOU HAVE ANY SERVERS EXPOSED TO THE INTERNET OR EVEN AN UNTRUSTED INTRANET YOU OWE IT TO YOURSELF AND YOUR COMPANY TO READ +YLES COLUMN THIS MONTH !S FOR ME ON THE other hand, I couldn’t decide what to write about, so I just wrote about all the various topics that I couldn’t decide between. My DAY TO DAY LIFE IS PRETTY NERDY SO HOPEFULLY SOME OF MY STREAM OF CONSCIOUSNESS MASHUP WILL BE OF USE ) TEND TO GET EXCITED ABOUT THE things I love, and I sure do love technology! .40 IS A SERVICE THAT HAS BEEN AROUND FOR A LONG TIME AND MOST OF US JUST INSTALL IT WITHOUT THINKING TWICE %RIC 3 2AYMOND COVERS .40SEC THIS MONTH WHICH IS A HUGE OVERHAUL TO THE .40 SYSTEM WE KNOW SO WELL )F YOUR EXPERIENCE WITH .40 ENDS WITH sudo apt-get install ntp, you should really read his article and CONSIDER .40SEC #HARLES &ISHER FOLLOWS %RIC WITH A LOOK AT ENCRYPTION SPECIFICALLY /PEN33, AND '0' ENCRYPTION WITH FLAT FILES 4HE CONCEPT OF ENCRYPTING FILES ISNT NEW BUT #HARLES WILL FORCE YOU TO LOOK AT THE IDEA IN A DIFFERENT LIGHT 0LUS HE INCLUDES LOTS OF CODE EXAMPLES WHICH always helps me understand things. Whether you want to improve your old technology with new or JUST IMPROVE YOUR EXISTING TECH THIS ISSUE SHOULD BE FUN 7E HAVE ALL THE FEATURES YOUVE COME TO EXPECT INCLUDING PRODUCT REVIEWS ANNOUNCEMENTS TECH TIPS AND SO ON 4HE BEST PART ABOUT IMPROVING YOUR INFRASTRUCTURE WITH ,INUX IS THAT UNLIKE h%XTREME -AKEOVERv IT WILL SAVE YOU PROBLEMS IN THE FUTURE INSTEAD OF CAUSING MORE 3O WITHOUT FURTHER ADO h$RIVER -OVE 4HAT "USvQ 9 | October 2016 | http://www.linuxjournal.com LJ270-Oct2016.indd 9 9/21/16 7:27 PM LETTERS[ LETTERS ] PREVIOUS NEXT V V Current_Issue.tar.gz UpFront Self-Sovereign Identity I always read Doc Searls’ column, not to learn anything new but to try TO FIGURE OUT WHAT HIS POINT IS )N THE *ULY ISSUE HE INTRODUCES THE CONCEPT OF hSELF SOVEREIGN IDENTITYv WITH SEVERAL OBSCURE SENTENCES AND THEN TO TAKE FUZZY THINKING TO A HIGHER LEVEL HE QUOTES $EVON ,OFFRETO WITH A PARAGRAPH OF ABSOLUTE GIBBERISH (ERES ONE EXCERPT ! SELF 3OVEREIGN IDENTITY PRODUCES AN ADMINISTRATIVE TRAIL OF DATA RELATIONS that begin and resolve to individual humans. And another: ! SELF 3OVEREIGN IDENTITY IS THE ROOT OF ALL PARTICIPATION AS A VALUED SOCIAL BEING WITHIN HUMAN SOCIETIES OF ANY TYPE Now that’s gibberish.