2010/02/07

Ode to SSH

Dearest SSH,


"Have I told you lately, that I [SSH] you?"

You encrypt my shell sessions.
You forward my TCP ports.
You proxy my HTTP sessions.
You compress my various tunneled applications.

...

Now is one of those moments when I reflect on how much benefit I get from a particular open-source project. Sometimes it's awk, Linux in general, etc... this time it's SSH.

Some of the things I use SSH for:
  • Secure terminal access to my servers (obviously)
  • Accessing my music archives from afar (DAAP over SSH)
  • Remote Desktop, only much safer (RDP over SSH)
  • Safely administering remote databases (MySQL over SSH)
  • Safer browsing from other networks - hotels, coffee shops, etc (SOCKS proxy via SSH)
My working environment, with the benefit of SSH:
  • Using GNU Screen, I can resume my work anywhere.
  • With vim, I can have a sensible programming environment on very low bandwidth
  • Git lets me push code around between several machines efficiently
  • Rsync (or unison) lets me synchronize and maintain file systems very conveniently
  • I issue updates and test code (mostly web apps) from anywhere, as though I were on site
Very rarely do I have to think about security - my SSH configuration lets me focus on business, rather than logistics. (Mind you, I had to think about it in order to set it up the first time, but once it's done, it's wonderful.)

Dearest SSH, Thank you.

2009/12/22

Gentoo won't boot!

I recently moved from Spokane to Portland. In all the chaos of finishing some things for my work, disassembling my home-office, and putting it all in a moving truck, etc, I neglected one critical element...


I had installed an update to sys-fs/udev which required kernel 2.6.27 or later, while the most-recent kernel I've got installed/compiled/etc is 2.6.25 (plus a couple others which were fubar). I had neglected to keep a recent kernel in working condition.

Gentoo users/admins will see the problem immediately (and probably shouldn't read the rest of this post, since it's not terribly magical).
  • Old kernel: udev won't run, so it won't see devices, especially my RAID array.
  • Newer kernels don't work at the moment
So I'm pretty much stuck. (If anyone can imagine a Windows machine in this situation and suggest a way to fix such a problem on Windows, I'd love to hear it...)

Fortunately I already had the sources for 2.6.31 on my server's filesystem, so I dug out a copy of System Rescue CD (somewhat aged), booted the server, mounted the RAID devices in their appropriate locations, and chroot-ed into my server's filesystem.

Then I:
  1. Took a snapshot of /boot and /lib/modules
  2. Copied the System Rescue CD's kernel config (/proc/config.gz) into my new kernel directory (/usr/src/linux/)
  3. Used 'make oldconfig' and 'make menuconfig' to bring it up-to-date and fine-tune it a bit.
  4. Use genkernel to build the new kernel and initramfs (including RAID/LVM tools) and install them
  5. Adjust my GRUB configuration, reboot, voila!
Mind you, at this point the kernel config wasn't optimal or terribly awesome, just functional. I'm currently in the process of tuning it further.

So... that's how Linux saved my sanity today.

2009/12/04

Time Management Matrix

So, in the last year I picked up use of Covey's Time Management Matrix (thanks to the recommendation of my previous boss).

It works great on a whiteboard, but I've always wanted a web app to do it.

So I set up a Google Spreadsheet to help me out. Here's how...

  1. Create a new spreadsheet.
  2. Rename the first sheet 'Entries'
  3. Create a new sheet called 'Matrix'
  4. On the 'Entries' sheet, label three columns:
    • Name
    • Importance
    • Urgency
  5. Create some example entries (see screenshots below)
  6. Go back to the 'Matrix' sheet
  7. Fill the cells in like so:

    A2: =SORT(FILTER(Entries!$A$2:$C$100, Entries!$B$2:$B$100 >= 5, Entries!$C$2:$C$100 >= 5); 2; 0; 3; 0 )
    D2: =SORT(FILTER(Entries!$A$2:$C$100, Entries!$B$2:$B$100 >= 5, Entries!$C$2:$C$100 < 5); 2; 0; 3; 0)
    A14: =SORT(FILTER(Entries!$A$2:$C$100, Entries!$B$2:$B$100 < 5, Entries!$C$2:$C$100 >= 5); 2; 0; 3; 0)
    D14: =SORT(FILTER(Entries!$A$2:$C$100, Entries!$B$2:$B$100 < 5, Entries!$C$2:$C$100 < 5); 2; 0; 3; 0)
  8. Cells A1:C1, D1:F1, A13:C13, and D13:F13 are left for labeling each section - and can be merged sensibly.
  9. I recommend marking borders along the right-hand side of column C, and the top of row 13 - for clarity.
  10. Also, columns B, C, E, and F can be shrunk to improve usability, since they contain integers 1-10.


And... that should be it! Create task entries, assign importance and urgency, and it should automatically appear in the appropriate quadrant on the Matrix sheet.

Screenshots: