Skip to content

Instantly share code, notes, and snippets.

@vodolaz095
Created February 23, 2015 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vodolaz095/9b00d7dfbc5cfc11f1ee to your computer and use it in GitHub Desktop.
Save vodolaz095/9b00d7dfbc5cfc11f1ee to your computer and use it in GitHub Desktop.
Regenerate SSH server keys
#!/bin/sh
ssh-keygen -q -f /etc/ssh/ssh_host_key -N '' -t rsa1
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa
ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa -b 521
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment