Pocket Sysadmin

I’m leaving on a jet plane, don’t know when I’ll be back again. External link

Actually, that’s not true: I will be back on Sunday. But the point is, I’m going on a trip… and more importantly, I’m not taking my laptop. Gasp! Can it be true? I’ll answer that for you: yes, it’s true.

OK, enough with this absurdly bad writing. On to the matter at hand: traveling sans laptop. Since I began freelancing in mid-2008, it’s been a given that I would always have my laptop with me. Not because I am a workaholic (not true) or because I’m an Internet junkie (true), but primarily because I needed to have a way to monitor and troubleshoot web server performance in case any of my clients had technical problems while I was gone.

But for this trip, I’ve decided I want to make it a real vacation. I want to remove the temptation to work when I really shouldn’t. I need a break. But I still need to be accessible if an emergency arises, and I need to be able to do something about it. Accessibility has been a non-issue ever since I got a cell phone: just call me. Or, since I got an iPhone: email, text, or call me (preferably in that order). But heretofore, the best I could do with a phone/iPhone was become aware of a problem. I still needed a full-fledged computer to actually do anything productive.

Over the past couple of weeks I’ve been preparing my iPhone to become an all-in-one tool for managing my business on the road. That meant setting up all of the diagnostic and troubleshooting tools I could, to ensure that I can adequately monitor the performance of the web servers I’m responsible for, and fix any problems that come up. Here are the tools I’m using to make that possible:

iStat

iStat

iStat is a very polished little utility for monitoring system performance. Its main feature is that it provides detailed stats on your iPhone itself: battery capacity, memory usage, storage available, IP address, uptime, running processes, and MAC address. But what’s really cool about it is that there are remote monitoring tools that allow you to monitor your Mac from your iPhone, or, more importantly for me, you can monitor a Linux, BSD or Solaris server. It requires a fair bit of command-line mucky-muck to set up (including compiling from source), but in a matter of minutes I had multiple Linux servers set up, sending their performance data to my iPhone wherever I go. With iStat, I can be proactive in monitoring server performance.

TouchTerm SSH

TouchTerm SSH

So, great. iStat lets me see how my servers are doing. But what if there’s a problem? That’s where TouchTerm SSH comes in. When I work with servers from my computer, the main application I use is Terminal. The SSH protocol allows me to connect securely to my servers with a command-line interface, where I can do anything I need to do: check running processes, modify configurations, restart services, etc. TouchTerm SSH is a fully-functional SSH terminal on the iPhone. With it, anything that I can do via SSH from my computer, I can now do with the iPhone. I just installed it today, so I haven’t completely put it through its paces, but I am sure that before long this will be one of the most indispensable apps I have installed on my iPhone. Even more than Ramp Champ.

Slicehost

Slicehost Pro

This one’s a bit more specialized, obviously, but since Slicehost’s iPhone app was one of the main selling points for me to go with them in the first place, it’s worth acknowledging.

Slicehost is a VPS hosting company based in St. Louis. They offer great service at unbeatable prices. Running a VPS is not for the feint of heart, but if you’re not afraid of taking full responsibility for your own server, Slicehost is the way to go. Their simple web-based admin interface makes it a snap to set up your own server with one of any number of Linux distros (Ubuntu, Debian, Gentoo, CentOS, Fedora, Arch or Red Hat), and once it’s running, to monitor its performance and reboot if necessary.

The iPhone app’s functionality is pretty limited, but it has the one critical function I need: if the slice becomes unresponsive, you can reboot it. Sure, you can do that from their mobile website too, but it’s always fun to have another app on your home screen.

On upgrading WordPress (and WordPress plugins) automatically over SSH/SFTP

For the most part, I love managing my own server. Even though it requires digging into the muck of Linux configuration files with my bare hands (so to speak), and if it goes down, I have no one to blame (or call on for help) but myself, it’s great to have full control and flexibility.

One downside I discovered as a WordPress user, however, is that the super-slick automatic upgrade feature of WordPress was broken on my server. WordPress only supports FTP and the (as I see it) somewhat pointless FTPS. Insecure as it is, my old host supported regular ol’ FTP, and that made WordPress upgrades painless.

There’s no way I’m going to implement FTP on my own server. It’s easy enough to install the package at the command line (really, it is), but I just see no reason to open myself up to the security risks. Granted, there aren’t really that many security risks (beyond one very big one — intercepted passwords) with a well-configured FTP server. But I don’t care to investigate the steps necessary to ensure an FTP server is well-configured.

The obvious choice is to use SFTP/SSH, but at first it looked to me as if WordPress simply didn’t support it. But as I’ve learned (and since proven with my own server), WordPress does support it if your PHP installation has the proper extensions installed. And here’s a guide to get you started.

Once your PHP install is upgraded to support SSH connections, the option will automatically become available in the WordPress upgrade tools, and it works perfectly!