Skip to content

Instantly share code, notes, and snippets.

@nohtyp
Created November 27, 2013 00:10
Show Gist options
  • Save nohtyp/7668616 to your computer and use it in GitHub Desktop.
Save nohtyp/7668616 to your computer and use it in GitHub Desktop.
sed one-liner to remove ssh-key output from known_hosts example: if offending ssh-key is on line 15 in known_hosts then the script would be ran as: sed -if '15d' /home/<user>/.ssh/known_hosts. This script can be used for many other issues.
sed -if '<number>d' file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment