Convenient login to Debian porterboxen
Whenever I want to login to a Debian porterbox to figure out some architecture-specific issue I typically do not care which particular host I am going to login to, just what architecture the host is.
After discovering that it is not yet easy for the Debian sysadmins (DSA) to add aliases to DNS for this purpose, I whipped up a quick script to grab the relevant data about Debian machines from the Debian LDAP server and work around this in my OpenSSH config.
To use the script you should run the script and place the magic
comment lines suggested by the script into your
~/.ssh/config file and
then run the script again, which will contact the Debian LDAP server using
python-ldap, download the relevant information and replace the
relevant part of your
~/.ssh/config file with some OpenSSH configuration
directives to map Debian architecture names to hostnames. Within just a
few seconds you will be able to login to
kfreebsd-amd64.port.debian.org instead of needing to manually look
up which servers to login for a particular architecture.