Skip to content
Permalink
Browse files

Leverage dpkg-reconfigure to regenerate SSH keys

  • Loading branch information...
lirazsiri committed Aug 13, 2014
1 parent 5289221 commit 24a829f5a1dd31a910bf8fa2ec405e9b2e2d7b71
Showing with 2 additions and 4 deletions.
  1. +2 −4 firstboot.d/10regen-sshkeys
@@ -4,7 +4,5 @@

echo "* Regenerating SSH cryptographic keys"

rm -f /etc/ssh/ssh_host_[dr]sa_key*
ssh-keygen -q -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
ssh-keygen -q -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa

rm -f /etc/ssh/*_key{,.pub}
dpkg-reconfigure openssh-server

0 comments on commit 24a829f

Please sign in to comment.
You can’t perform that action at this time.