Knowledgebase
Knowledgebase
Corrupted SSH After VPS Cloning
Posted by Ilya Vasilenko on 31 May 2016 05:17 PM

After successful cloning of existing Linux based VPS, inaccessible SSH may occur. In that case we have to regenerate keys

After successful cloning of existing Linux based VPS it may happen of inaccessible SSH.

The reason might be old ssh host keys, copied from the cloning donor.

 

In that case we have to regenerate keys.

 

Debian/Ubuntu:

Remove old keys:

# /bin/rm -v /etc/ssh/ssh_host_*

Reconfigure new keys:

# dpkg-reconfigure openssh-server

 

Sample output:

Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Restarting OpenBSD Secure Shell server: sshd.

 

Centos:

Remove old keys:

# /bin/rm -v /etc/ssh/ssh_host_*

Just re-start SSHD:

# /etc/init.d/sshd restart

 

 

 
(0 vote(s))
Helpful
Not helpful