Created
November 2, 2017 00:32
-
-
Save steveathon/c409202c551b56a14920d983d9349fdb to your computer and use it in GitHub Desktop.
Ubuntu script to reset OpenSSH Server Keys
This file contains 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 | |
echo "Removing the existing keys... don't disconnect... :D" | |
/bin/rm -v /etc/ssh/ssh_host_* | |
# Do a Dr Who and regenerate | |
echo "Must.... regenerate" | |
dpkg-reconfigure openssh-server | |
# Now restart the service | |
service ssh restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment