Regenerating ssh files
After cloning a VM, how do I regenerate the files in /etc/ssh because these files are supposed to be different for different hosts:
Code:
[root@centos5 ~]# cd /etc/ssh
|
I think I found it
Code:
ssh-keygen -G moduli.candidates -b 2048 |
It looks like moduli is the same set of groups on all CentOS servers. So it does not need to be regenerated. In case someone is looking for the same, here are the complete steps to recreate the private and public keys:
Code:
ssh-keygen -C '' -t dsa -f /etc/ssh/ssh_host_dsa_key |
The /etc/init.d/sshd init script already checks for and will generate them OTF if these files are not available, so basically delete the keys and restart the service.
|
All times are GMT -5. The time now is 09:58 AM. |