Re: server host keys for kvm clones

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Jan 4, 2012 at 8:08 PM, James B. Byrne <byrnejb@xxxxxxxxxxxxx> wrote:
> Respecting cloning vm guests, I see in /etc/ssh the
> following:
>
> ssh_host_dsa_key
> ssh_host_dsa_key.pub
> ssh_host_key
> ssh_host_key.pub
> ssh_host_rsa_key
> ssh_host_rsa_key.pub
>
> Is there a simple script somewhere to regenerate all the
> server host keys for the new guest after cloning?

Simple, just remove them and boot the server or restart sshd:

# rm -f /etc/ssh/ssh_host*key*; /etc/init.d/sshd restart
Stopping sshd:                                             [  OK  ]
Generating SSH1 RSA host key:                              [  OK  ]
Generating SSH2 RSA host key:                              [  OK  ]
Generating SSH2 DSA host key:                              [  OK  ]
Starting sshd:                                             [  OK  ]

--
Mikael Fridh
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux