Shell Script To Remove All Keys Belonging To Hostname From a ~/.known_hosts File

Posted on in Categories File-management last updated December 14, 2009

How Do I Use This Script?

Simply run it as follows:

1 comment

  1. ips=$(host “$host” | awk -F’address’ ‘{ print $2}’ | sed -e ‘s/^ //g’)

    could be shorten to: ips=$(host “$host” | awk ‘/address/ { print $NF }’)

Leave a Comment