Using RSA Keys on SiteGround

If you host your website over at SiteGround like I do and are at least somewhat technically savvy, you may want to consider securing your account with a stronger key than SiteGround suggests.

If you follow their instructions to the letter, you’ll end up with a 1024-bit DSA key. Their cPanel key management interface confirms this:

SiteGround Add SSH Key

This seemed strange to me though, since every key I’d ever generated before had been RSA. And while I’m no security expert, I always try to use stronger keys when I can, so the 1024-bit limit was disconcerting.

What SiteGround doesn’t tell you is that cPanel’s SSH key management interface is just that: an interface on top of the real way to add keys to your account, which is via the ~/.ssh/authorized_keys2 file. After some testing, it turns out you can add RSA keys by hand and use those.

You can generate a 4096-bit RSA key with this command:

ssh-keygen -t rsa -b 4096 -C "SiteGround.com"

As always, use a strong passphrase and be sure to create a brand new key file; do not overwrite one that you use for something else!

Now just add the new public key to your ~/.ssh/authorized_keys2 file on SiteGround. You can do this while SSH’ed in (using your old DSA key and nano) or over FTP (using a regular text editor).

Once that’s done, you’ll need to switch over your config files and/or apps to the new key. For example, if you have an FTP client using the old DSA key, set it to use the new RSA key instead.

There you have it: strong RSA keys on SiteGround!

[Thanks to Moyan Brenn for the featured image.]

Civil War Mad Lib

I’m currently reading Battle Cry of Freedom by James M. McPherson.

If you only read one book about the American Civil War during your life, make it this one. It’s surprisingly readable and comprehensive, but still thick enough that you can brag about it when you’ve finished.

Anyway, I finished reading the ninth chapter a few days ago, about how the eight upper South states handled their “divided allegiance” shortly after the war started. Near the end of the chapter was this sentence:

Guerrilla warfare and the problems of administering sizable regions with populations of doubtful loyalty tied down large numbers of Union troops in the border states.

Remind you of anything?

Simply replacing “Union” with “U.S.” and “the border states” with “the Middle East” and you’ll see that, indeed, history does repeat itself. It’s also interesting to see how the weapons that we use to fight wars have changed over time, but the basic techniques have not.

More information on this topic:

Adding Perfect Favicons

Adding a favicon to your website is sort of like exercising: pretty much everyone agrees that you should do it, but how much and in what way haven’t ever been nailed down quite as much as you’d like.

Luckily, there’s a site that can help: RealFaviconGenerator.net.

I came across the site on CSS Tricks and used it get all the necessary code for this very site’s favicons. The markup looks something like this:

I also hacked together a quick WordPress plugin to take all of that code and echo it out in your site’s <head> element. Here it is on GitHub.

Once the plugin’s activated, the workflow is basically this:

  1. Upload the icon files to your web host.
  2. Copy the code RealFaviconGenerator gives you.
  3. Paste it into add-site-icons/rfg-output.txt.
  4. Save the file and you’re done!

I’m planning to work on it a bit more in the coming weeks. It could use come caching (via the transients API) and a few other things.

Reddit is What You Make of It

Anyone who has been on the Internet in the past 10 years has heard of Reddit. Even people who can hardly use the Internet have heard of it at least, since Reddit’s certainly no stranger to controversy.

What gets lost in the criticism though is one basic truth: Reddit is just a tool. Specifically, it’s a tool for improving the way communities of people share things. And just like any other tool, it can be used by anyone, with no regard for their particular motivations or morals.

If I could indulge myself with a Star Wars reference for a second, Reddit isn’t the Mos Eisley of the Internet. Reddit is more like a planet on which all sorts of cities, good and bad, can form.

Is there morally disgusting material on Reddit? Yep. Is there downright illegal material? Probably, yeah. But is there also inspirational stuff, and communities of users dedicated to doing good in the world? You bet.

What I’m trying to say is that Reddit is what you make of it. No more, no less. If you go expecting to find porn and racist bigotry, you’ll find those things. If you go looking for heartwarming kindness and knee-slapping hilarity, you’ll find those things as well.

Figuring out Reddit is a lot like figuring out who your real friends are in life. You start out with a set that you were kind of given by default, just because they were there when you first started.

Over time, you start to realize that, in order to be happier, you need to keep cutting the bad ones loose and while also watching out for the good ones that come along every so often.

[Thanks to Sean Welton for the featured image.]