Cron rsync with encrypted SSH keys on OS X

There are many online resources about using SSH keys to achieve passwordless, cron-initiated tasks like rsyncing some files around. Most of these assume your SSH key is either not encrypted with a password, or that you're running the related command in an interactive session.

What I couldn't easily find recently was a way to make sure that a script initiated via cron on OS X 10.10 (Yosemite) and that uses an SSH key that is encrypted with a password would have access to that key as managed by the current login session's ssh-agent.

This problem manifested itself with the following kind of output from my rsync command - being used to back up some files from a remote server - when it was executed via cron:

Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-45/rsync/io.c(453) [receiver=2.6.9]

If I ran the same command from the shell prompt it worked fine.

Continue reading Cron rsync with encrypted SSH keys on OS X

Cloud email, contacts & calendars without Google

Tricky situationI like Google and a lot of the things it does in the world. When people ask me what free mail, calendaring and contact syncing tools they should use, I usually include Google's services in my answer. But I always explain that they're trading some privacy and ownership of their information for the "free" part of that deal. "You're the product, not the customer" and all that.

For me, I've always tried to avoid having my own data and online activities become the product in someone else's business model. There are plenty of places where I can't or don't do that, and I mostly make those tradeoffs willingly. But so far, I've been able to avoid using Google (and Apple and Microsoft) for managing my personal email, calendaring and contact syncing.

Here's how.

Continue reading Cloud email, contacts & calendars without Google

Comcast Bandwidth Deception

I work on the Internet. Having a fast Internet connection is an important part of my work environment. At home, I also use my Internet connection for entertainment and home automation. When my Internet connection is slow or isn't working, I notice.

For the last few months I've been a reluctant Comcast cable Internet customer, after technical and speed challenges with the local DSL provider I was using couldn't be resolved. I pay for a 25Mbps download speed service level with Comcast. But almost as soon as we had service turned on, I started noticing that from around 5 PM until around 10PM or later, our available speeds would significantly decrease - sometimes down to 1Mbps or lower.

I contacted Comcast about it. After all the usual ridiculousness where they try to sell me phone service, tell me I need a new cable modem, tell me it must be squirrels, etc, we got to the heart of the matter:

Me: Is our bandwidth shared with other users, or should it be protected even during peak times?
Comcast: It's not shared at all.

I didn't believe them, but I believed that they wouldn't admit to the bandwidth being shared. So I started collecting data to prove otherwise.

Using a command line tool to query the speedtest.net service, I set up a script that would run once every hour and record the currently available download and upload speeds, as well as ping time. I put all that in a spreadsheet. After two months, I graphed the average upload and download speed available at each hour of the day:

Continue reading Comcast Bandwidth Deception

Zero to One

I thoroughly enjoyed Peter Thiel's Zero to One: Notes on Startups, or How to Build the Future.

It's one of the few "business books" I've read recently that incorporates anything resembling a coherent global ethic into thinking about what it means to create and grow a business. Beyond that, he gets into some great reflections on human creativity, optimism and pessimism about the future, and investing.

I didn't always agree with Thiel's views or counsel, but I found his thinking to be clear and his insights helpful, especially on what it takes to build something that makes a substantial and/or lasting difference in the world. Read through the lens of my past experience creating a startup tech business and my current thinking about what I can do for the world in the future, there were some lovely and/or cringe-worthy "ah-ha" moments.

I highlighted many passages as I read, here are a few that stand out:

Continue reading Zero to One

Chrome extensions to manage online privacy

Privacy

There are a couple of extensions for Chrome that I've been using for a while now to try to maintain or improve my privacy online. Some have been helpful, others haven't. Some mini-reviews:

Terms of Service, Didn't Read

Most every modern website has a "Terms of Service" that governs your interactions with it. The document usually lays out how and when the site will use any data it collects about you - helpful, right? The document is also usually many pages long and would potentially take hours to fully absorb and understand. Terms of Service, Didn't Read is an extension that tries to give you a high-level view of the Terms of Service of the site you're on, based on their team's reading and interpretation of those documents on your behalf. If there are particular concerns related to privacy and personal data use, the extension will flag that when you arrive.

I used this extension for several months, finding it interesting at first to see how the sites I visited regularly measured up to TOSDR's evaluation. But after the initial curiosity wore off, I realized that for the most part, the information here wasn't changing my behavior. If TOSDR flagged something like "The copyright license is broader than necessary" or "This service tracks you on other websites," I'd still have to do some more digging to figure out exactly what that meant, and whether or not I was comfortable with it. So, the information provided by TOSDR is helpful, but not always conveniently actionable when it comes to protecting privacy. (There's a theme in all this: protecting privacy is rarely convenient.)

Continue reading Chrome extensions to manage online privacy

OMG, Best. Post. Evaaar.

HyperboleThese days it feels like hyperbole has completely taken over the world.

Err, that is...well, let me explain.

There's a lot of information being thrown at us all the time (news, entertainment, advertising, status updates), and a near-constant drive to try to make that information compelling, interesting or just weird enough to stand out from all the rest (think cable news, YouTube videos, all of the people making a living on various forms of marketing, political rhetoric).

It's a bit understandable, then, that in our daily communications we are tempted to exaggerate and embellish things. How else will our commentary about how life-changing this bowl of soup is stand out against all of the other commentary about how earth-shattering that coffee drink is or how vitally important that cute baby animal video is??

Continue reading OMG, Best. Post. Evaaar.

The Martian by Andy Weir

I recently finished reading The Martian by Andy Weir. It was one of the most enjoyable works of fiction I've read recently, and so I can't help but recommend it here.

The story is a kind of Robinson Crusoe/Cast Away extreme survival adventure that happens in space, and will especially appeal to fans of MacGyver-style resourcefulness with some realistic science and geeky tech explanations thrown in. It's also pretty funny at times, and strangely moving at others. Check it out.