Tuesday, December 30, 2014

Generate SSH hostkey after install openssh

If hostkey is lost or not automatically installed, we can generate with command below

root@ssh-server:/# ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
root@ssh-server:/# ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa



and/change the configure of the hostkey in /etc/ssh/sshd_config

HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key



- restart ssh service

root@ssh-server:/# service ssh restart

No comments:

Post a Comment