Quick and dirty way to scan host keys

This will go through the list of hostnames you give it and return a correctly formatted string to be added to your known hosts setup It’s ugly and quick

for i in hosta hostb; do
ssh-keyscan  -t rsa  $i,`python -c "import socket; print socket.gethostbyname('$i')"` > b
done