Skip to content

Instantly share code, notes, and snippets.

Last active December 16, 2015 07:43
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save lyndell/c2f53d0c3e3c0e37af70 to your computer and use it in GitHub Desktop.
# Name:
# Desc: Remove an IP's fingerprint from the SSH known_hosts file
# URL:
# Author: Lyndell Rottmann
# WWW: http://Lyndell.US
# Copyright (c) 2015 Lyndell Rottmann
# Debug mode on/off: (default off)
set +x
if [ -z $1 ]
echo "Please provide an IP."
IP=$1 # IP from comand line
sed -i -e "/${IP}/D" ~/.ssh/known_hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment