Created
November 28, 2016 14:46
-
-
Save childnode/18de20f4448692257aa3e99c8319b70d to your computer and use it in GitHub Desktop.
regenerate all hostkeys for sshd
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
for i in /etc/ssh/ssh_host_*_key; do ssh-keygen -f $i -t $(echo $i | awk 'BEGIN {FS= "_"} { print $3}'); done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment