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
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
If you own an ASUS router and you brick it while trying to upgrade the firmware or some other action, you'll probably find documentation saying you need to run a Windows-only firmware restoration program to undo this damage.
While this is apparently the only officially supported method for restoring firmware (the alternative being to ship the router to ASUS for repair, a 10+ day process), I found with some exploring that the Windows program is likely just a glorified tftp client, and that you can restore firmware using some more standard, non-Windows tools.
I'm listing below the steps I had to use today after trying to upgrade my RT-AC66U device from firmware version 22.214.171.124.266 to 126.96.36.199.270. (The release notes for the latter indicate a fix for a "live update related bug" which is what I suspect I encountered when I first tried to do the upgrade via the web GUI.)
I'm a Mac user, but these steps should work for other non-Windows operating systems such as Linux. It hopefully goes without saying that you should follow these steps at your own risk, and I make no claims or warranty about the outcome; you could end up worse off than you are now. You could set your router on fire. You could end up killing another version of yourself living in an alternate universe. Be careful.
Continue reading Recovering ASUS router firmware without Windows
I've been using the CrashPlan automatic backup system for my home computing devices for almost a year now, and I offer up this review.
Prior to using CrashPlan, I have to admit that my backup strategy for home computers left much to be desired. Over the years I had tried various combinations of home-grown scripts and syncing tools that broke too easily or didn't offer enough flexibility in recovery, crusty third-party software that seemed to take hours to configure and then never quite did what I expected or didn't work with all the different devices I used, and even elegant tools like Apple's Time Machine backup system that still didn't offer me the off-site redundancy I wanted in case of physical catastrophe.
The end result was that my backups were happening infrequently, and in ways that did not necessarily guarantee the ability to restore what I would need in the event of a system failure or worse. For someone who preaches the importance of backups to my friends, family and clients all day long, this was an embarrassing state of affairs. Then, one day a friend's laptop was stolen from his house, and as I listened to the stories of what was lost because of an incomplete backup and imagined what I would possibly lose if the same happened to me, I knew I needed to look for a better system.
That's when I found CrashPlan.
Continue reading Review of CrashPlan for computer backups