Wednesday, May 14, 2008

Ubuntu OpenSSH vulnerability: how to update host keys

So there was a key generation weakness in Ubuntu openssh packages. The upgrade process regenerates your host keys. But now all of your other machines complain that the host key has changed. And Ubuntu hashes your known_hosts file (HashKnownHosts yes, in /etc/ssh/ssh_config), so you don't know which line to remove. Clean out your whole known_hosts file?

No. To find the hashed key, use:
ssh-keygen -F hostname
ssh-keygen -F ip_address
Remove both of the matching lines from ~/.ssh/known_hosts.

Now you're connecting to your server box and it prompts you if you want to accept the new key. Is that signature correct, or is there a man in the middle? You did keep an ssh session open to the machine while upgrading, right? So on the server, run:
ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub
(or _dsa_key, perhaps). If that fingerprint matches, you're set. If not, you've probably got a man in the middle. Or you just checked the fingerprint on the wrong machine ;)

Thursday, May 01, 2008

sipb-xen

It has come to my attention that some people don't know about sipb-xen.

Anyone with an MIT login can get a private virtual server with up to 50 GB disk and 512 MB RAM, free. You have to be comfortable installing an OS yourself, but it's not hard, and there's a clone option for getting a Debian machine. Once up, your server will be accessible at servername.servers.csail.mit.edu.

Tuesday, April 29, 2008

Right mouse button mapping on Linux Tablet PC

The pen button is much more useful as a right click than a middle, but it defaults to middle.

I thought I could fix it with xinput, like:
xinput set-button-mapping stylus 1 3 2
but this turns out not to work.

What actually works (from the Ubuntu bug) is:
xsetwacom set stylus Button2 3
I added this to the GNOME session (system->preferences->session).

Thursday, April 17, 2008

Dvorak Spanish keyboard layout (xkb)

Here's a basically US-English Dvorak layout, with right Alt meta mapped to give you Spanish characters right where you'd expect them: meta-vowel is accented vowel, meta-n is ñ, meta-1 is ¡, and meta-/ is ¿.

Add the following to your /usr/share/X11/xdb/symbols/us file:

partial alphanumeric_keys
xkb_symbols "dvorak-spanish" {

name[Group1]= "USA - Dvorak with Spanish extras";

include "us(dvorak)"

key <ae04> { [ 4, dollar, EuroSign ] };

key <ad04> { [ p, P, udiaeresis, Udiaeresis ] };

key <ac01> { [ a, A, aacute, Aacute ] };
key <ac02> { [ o, O, oacute, Oacute ] };
key <ac03> { [ e, E, eacute, Eacute ] };
key <ac04> { [ u, U, uacute, Uacute ] };
key <ac05> { [ i, I, iacute, Iacute ] };
key <ac09> { [ n, N, ntilde, Ntilde ] };

key <ae01> { [ 1, exclam, exclamdown ] };
key <ad11> { [ slash, question, questiondown ] };

include "level3(ralt_switch)"
};
Then say 'setxkbmap us dvorak-spanish'.

Tuesday, April 15, 2008

Lisp: IMAP SSL

I've found two IMAP libraries in Common Lisp: mel-base and Franz's postoffice. Neither supports SSL as far as I can tell. Most IMAP servers now require SSL. Do I take that to mean that no one is doing IMAP in LISP anymore?

btw, mel-base currently doesn't work with Allegro.

But you may find this optimization helpful.

Wednesday, April 09, 2008

Recovering a Toshiba M200

The Toshiba M200 is a relatively unimpressive tablet PC that I've borrowed for an extended period. The Windows install on it was performing terribly (I also have Linux on it), so I decided to recover it from the recovery DVD.

Two days later...

Here's what didn't work:
  1. Booting the DVD from GRUB (it doesn't know how).
  2. Booting from a Philips SPD3100 external DVD drive.
  3. Booting the floppy image from that disk (geteltorito helps here). (hung forever loading the USB driver usb20.dev)
  4. Booting from a FreeDOS image. Okay, I admit it's because I gave up trying to find a single-floppy image.
Finally I've found something that seems to be working. Outline:
  • Network boot floppy (yes, networking in DOS) from NU2
    • loaded on an SD card in the internal reader (name the floppy image file '$tosfd00.vfd')
    • The network card is e100 compatible, so the drivers are included. phew.
    • Generally just follow the menu prompts in the boot floppy
  • SMB shared CD
    • I used Mac OS 10.4: enable Windows Sharing under System Preferences-Sharing
    • Get your computer's real SMB/NetBIOS name (it's not the name the control panel tells you, but rather a shortened, munged version of the 'Computer Name' at the top of the window): bring up a terminal, then 'grep netbios /etc/smb.conf' and you'll see it.
    • Otherwise, follow the instructions in the second part of this guide (ignore the stuff about the PXE boot server; we got around that by booting off the SD card
The instructions only overwrite your first partition, so your other data isn't destroyed, and neither is your bootloader. Back up anyway. I got around 120 MB/min transfer rate, so it took around 15 minutes to restore.

On first boot, part of Windows XP Setup runs. It asks some simple questions like Administrator password, then reboots. You'll log in as Administrator.

Unplug your network and enable the firewall (Control Panel/Network/Network Connections/Local Area Connection/Properties/Advanced/Internet Connection Firewall). Then plug in and visit Windows Update immediately. My recovery CD was SP1, so it'll need to fetch SP2. You'll probably want to create a normal user account for yourself too, so you're not running as Administrator.

PS - the Toshiba Software Updates thing is useless. Remove it and use Microsoft Update. You can also remove Toshiba Registration, SurfHere, Zinio (delete the folder in C:\) and who knows how many other things you won't ever need.

Monday, April 07, 2008

The God of Peace Brought the Good Shepherd from the Dead

Jesus will always be our shepherd and we will always get the incomparable joy of being his sheep.
John Piper's Easter message. Starts off a little awkwardly, but looks good so far. I've only watched through the first point.

always sheep in need of a shepherd.
... and most of our shepherds suck.
... which is why we need Jesus as our shepherd

Universal Widget API

UWA: Easily make widgets that deploy to the major dashboard-type hosts.

Monday, August 27, 2007

MIT so far

Sunday: slept in, walked to CityLife in the afternoon, met Brandon there, excellent refreshing and solid service (!)--I'll be going for the next few weeks at least, God willing--caught up with Brandon afterwards, took T back, ran into Emily Veysey sitting right next to me..., ran into the Cambridge carnival at Kendall, caught up with Sarah and Matt, met other new people at Ashdown computer cluster.

Today: orientation stuff, good free food, set up bank account and TechCash and $30 monthly T pass. Discovered some good stuff online--I really so badly want people to understand the essence of the reality of the Gospel b/c it's so different and so cool. Jesus ain't just my homeboy.

Discovered a lot of things here...
  • Grad students aren't quite so anti-social as I thought.
  • Athena is pretty cool. It's got lots of programs available through AFS "lockers". You can install it on your home machine, or upgrade Debian-based distros to run its software. There's a huge cluster on the 5th floor of the student center (Stratton). And you can get root. And printing is free.
  • Right across from the Athena cluster in Stratton is a huge reading room, with 6 or 7 group study lounges too. Couple that with laptop and it looks like a great working space. If not too crowded.
  • There are 4k undergrads and 6k grads here. Yup, more grads than undergrads...
  • 4th floor of Stratton has three piano rooms, MIT card access. One upright, two baby grands. Nice. I realized just how much grace God has shown me in my piano playing ability... without ever really intentionally practicing, I'm able to just play stuff, styled chords really, to pretty much any song I know and have it sound decent. What really got me was pedaling. I've been conscious for a while that I use the pedal a lot. I wondered occasionally if I just held it down all the time and made an ugly sound. Today I decided to actually try holding it down and seeing if it sounded like what I usually play. As soon as I hit the second chord it sounded muddy, not like usual. So I realized, when I let my foot go back to doing what it normally did, was that I have always been pedaling chord changes smoothly, without ever really noticing or practicing it. Grace.
I'm probably meeting with my adviser tomorrow. I need to remember to ask about computers.

A good read: http://mrlauterbach.typepad.com/gospeldrivenlife/why-the-gospel-must-be-ev.html

Thursday, May 17, 2007

Chickenfoot

Cool Javascript dev. Really needs my rich editor idea.

Chickenfoot.

Everything is Miscellaneous: Link, not Hierarchy

I've been saying this for years, perhaps not as forcefully. See "Ken's Stuff Manager" proposal for implementing this. I thought about it first really in the domain of the Bible, capturing all of the different kinds of ways that verses/chapters/topics can relate to each other. More recently I've also found it in just making lists (e.g. friends), or coding (concepts and their relationships). OOP is hierarchy. Ken prefers relationships (of which IS_A is just one type).

See the video:



Or the guy's home page.

Monday, January 22, 2007

Mexico trip

I'll be posting my travelogue from my trip to Mexico here. Summary:

Dates: Saturday, Dec. 30, 2006 to Tuesday, Jan. 16, 2007
Places:
  • San Cristóbal de las Casas, Chiapas (incl. San Juan Chamula and Chiapa de Corzo)
  • Morelia, Michoacán (incl. Pátzcuaro)
  • México D.F.
  • Mérida, Yucatán
  • Cozumel
People:
  • Nery González and his family
  • Oscar García and his family (including tios en México)
  • many, many others
Photos at photobucket.

Wednesday, January 03, 2007

A Night in Mexico City (2007-01-03)

The Mexicana flight arrived in Mexico City around 10pm, but we waited in the plane for a while for a bus to come pick us up. By the time the bus found its way back to the terminal, it was nearly 11. I found Oscar's uncle Hugo and his son Juan Pablo waiting for me, holding a sign with my name. I readily confirmed that they knew Oscar and weren't just random people. I checked at Aviacsa to see if maybe I could exchange the ticket for the flight I missed for one to Morelia, but they were closed. I exchanged the rest of my dollars for pesos at the airport, then we took a cab back home. They have a car, but took the metro there because the traffic was very bad. So we took a taxi back. I talked to Juan Pablo a lot, mostly in English; he seemed to prefer that. He finished a philosophy degree and is now working on biology at UNAM. We talked philosophy and religion a bit.

Hugo and his family live in the southern part of Mexico City, near UNAM, very close to the Copilco metro stop. (It's somewhat visible on this map.) We arrived by taxi. I met Maria (whom others just call 'jefa' most of the time), Hugo's wife. Jimena, Juan Pablo's sister, was already asleep. We had some food and talked, then I got on their computer upstairs to check on some things (dial-up). Looked on Aviacsa's website and found that there were no direct flights to Morelia; it would have to be through Monterrey or something like that. So I basically gave up on exchanging my ticket. Checked email also, put in a transcript request I had needed... then went to sleep in Juan Pablo's room.

Woke up the next morning late, took a shower, had breakfast, etc. One of Juan Pablo's friends -- Javier, I think -- had come over, and we talked, again mostly in English. Around 3 in the afternoon Maria and Juan Pablo took me to the bus station, and I took the bus to Morelia. For about 300 pesos (~$30 dollars) I took the nicest bus I'd ever been on. Three seats wide (I was in one of the singles), flat-screen TVs with movies, headphones for the sound, and a cushion that folded down from the seat in front to rest your legs on. We left at 4:30pm, I think; the ride to Morelia took almost exactly 4 hours.

Coming soon: Oscar in Morelia.