Skip to content

Instantly share code, notes, and snippets.

@tsabat
Created June 14, 2013 18:43
Show Gist options
  • Save tsabat/5784234 to your computer and use it in GitHub Desktop.
Save tsabat/5784234 to your computer and use it in GitHub Desktop.
Function to remove line from known_hosts without vim, using sed, for Mac OSX

put this in your .zshrc and smoke it.

function known_host_remove() {
  sed -i .bak "$1 d" ~/.ssh/known_hosts
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment