SSH’s new “VisualHostKey” option (in Ubuntu Intrepid and Debian Lenny) is great fun. Normally it is disabled, but it seems that “ssh-keygen” turns it on when generating new keys. In celebration of the Ubuntu release, here is a script to entertain yourself with RSA ASCII-art, care of SSH and your system’s entropy pool:
#!/bin/sh
set -e
DIR=$(mktemp -t -d rsa-art-XXXXXX)
trap "rm -f $DIR/key*; rmdir $DIR" EXIT HUP INT QUIT TERM
while :
do
ART=$(ssh-keygen -t rsa -f $DIR/key -N "" | tail -n 11)
rm -f $DIR/key
/bin/echo -e "\x1Bc"
echo "$ART"
done
Makes me feel like I’m watching Life. (Use control-C to stop it.)
© 2008, Kees Cook. This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 License.