How to regenerate ssh certificate on CentOS

For ssh1 protocol:

sudo ssh-keygen -f /etc/ssh/ssh_host_key -N '' -t rsa1

For ssh2 protocol:

sudo ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
sudo ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa

Leave a Reply

Your email address will not be published. Required fields are marked *