PuTTY to BSD with home/end

25 Feb 2009 • 1 min read

PuTTY is a good Windows Terminal emulator that supports SSH. As such, you can use it to SSH into your Linux server and administer it. Life was good.Imagine my horror when I used it to SSH into my FreeBSD and NetBSD boxes and my home/end keys didn't work! Yea gods, editing files became harder. After spending time on why home/end didn't work on the standard NetBSD console either I had a good idea as to what was wrong.Basically PuTTY sends linux console style home/end by default. It has a toggle for rxvt style, but that's provided rxvt (and as such it's termcap entry) was compiled with -DLINUX_KEYS, which the BSD termcaps are not. This isn't good :(So I've spun a patch for PuTTY that changes the default home/end to match XTerm (as that's the default $TERM it sends) and changes the rxvt toggle to send the default style that rxvt expects. You can download the diff and/or a win32 binary I've built as Windows machines don't normally come with a compiler. I've sent the patch upstream - and hopefully it will be accepted so that PuTTY works out of the box for BSD and Linux servers.