Created
May 19, 2016 00:06
-
-
Save ryanmaclean/cb7da53fb2f8140800bef704654e5a3a to your computer and use it in GitHub Desktop.
Remove an Entry From known_hosts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Replace '1d' with the offending line number, for example '10d' would be for the 10th line | |
| # The line number is the number after ":" in your warning, for example: | |
| # "Offending ECDSA key in /home/root/.ssh/known_hosts:10" | |
| sed -i '1d' ~/.ssh/known_hosts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment