Skip to content

Instantly share code, notes, and snippets.

@rca
Created July 6, 2012 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rca/3063092 to your computer and use it in GitHub Desktop.
Save rca/3063092 to your computer and use it in GitHub Desktop.
Remove a line from the SSH known_hosts file.
function khd
{
[ -z $1 ] && echo "No line number given" && return -1
sed -i -e "${1}d" ${HOME}/.ssh/known_hosts
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment