Skip to content

Instantly share code, notes, and snippets.

@mmaassen
Last active December 30, 2015 05:39
Show Gist options
  • Save mmaassen/7783808 to your computer and use it in GitHub Desktop.
Save mmaassen/7783808 to your computer and use it in GitHub Desktop.
Remove key from known_hosts, OSX
#!/bin/bash
## use on OSX
if [[ $# -eq 0 ]]; then
echo "Remove key from known"
echo "Usage: $0 <linenum>"
else
sed -i '' "${1},${1}d" ~/.ssh/known_hosts
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment