Archive for December, 2007

Dec 13 2007

Managing known_hosts file

Published by under Linux,Mac,Network

Recent Debian installations of openSSH default to a hashed host name in the known_hosts file used by openSSH. This makes it more difficult to manual maintain and edit this file. A good start on the commands that can (should?) be used to manage know_hosts can be found on this blog entry.

Two useful commands:

search for an entry: $ ssh-keygen -H -F hostname
delete an entry: $ ssh-keygen -R hostname

An online version of the ssh-keygen man page provides more detail on the options it provides.

Since a one way hash is used, there isn’t any way to list all the entries in known_hosts with machine names “de-hashed”.

No responses yet

Dec 10 2007

WordPress Upgrade to 2.3.1 & the k2 theme

Published by under web

Several problems have come up as a result of database table changes made in wordpress 2.3. Most if not all involve the categories table that was eliminated in favor of a new table. Some themes, including k2, and some plugins are no longer consistent with the database. It seems that the changes are mainly:

  • categories –> terms (a table)
  • cat_ID –> term_ID
  • cat_name –> name

I suppose this is documented better on a wordpress page somewhere, but I never found the description. Googling did turn up other leads.

On one of the sites that use k2, I found the problem in this file: …/wp-content/themes//page-archives.php

Commenting out the following two lines eliminated the error. A crude fix, but I haven’t noticed any bad effects yet.

// $numcats = $wpdb->get_var("SELECT COUNT(1) FROM $wpdb->categories");
// if (0 < $numcats) $numcats = number_format($numcats);

Another site that uses k2 has a different set of symptoms, but that was probably due to some files left over from a prior version of k2. Once I thorough clean out and upgrade with plugins off it was ok. The main trick for me was to switch to the default theme while doing the upgrade. When k2 was the active theme, the database upgrade step failed.

No responses yet