Last active
December 3, 2015 19:50
-
-
Save b4hand/02c2fff11363833c1ae5 to your computer and use it in GitHub Desktop.
Clears out old ssh keys in ~/.ssh/known_hosts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| hostname=$1 | |
| ip=`host $hostname | head -1 | awk '{print $4}'` | |
| ssh-keygen -R $hostname | |
| ssh-keygen -R $ip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment