ssh key fingerprints on your palmpilot

When you work on different computers with ssh you have the problem that on every first time connect ssh asks you to accept the fingerprint of the server. Most people just type “yes”, because they can’t memorize the fingerprints. But if you care about security (which you should do when using ssh …) this is not really an option. One possible solution is to carry with you all the fingerprints you have in your palmpilot.The following code snipplet generates the fingerprints for your servers public keys out of you known_host file and saves them in a text file similar to a palm memo entry . Assumed that you synchronize your text files in ~/MyMemos with something like kpilot with your palm, you can call it regulary to have your fingerprints alwayss available.

#!/bin/sh
cat > ~/MyMemos/Privat/SSH-PublicKey-Fingerprints <<__EOF__

SSH-PublicKey-Fingerprints

erzeugen mit ssh-keygen -fl Datei


__EOF__

ssh-keygen -lf ~/.ssh/known_hosts | awk '{ print ""; print $3; print $2; }' >> ~/MyMemos/Privat/SSH-PublicKey-Fingerprints