Regenerate linux host fingerprint

2

Is it possible to change a hosts ssh fingerprint? An example of needing to do this would be a virtual machine clone having the same fingerprint as the source of the clone; which causes problems for applications such as Puppet.

Spechal

Posted 2013-08-26T18:55:54.823

Reputation: 219

Answers

3

which distribution of linux you have? if it is ubuntu, you can remove all the host keys /etc/ssh/ssh_host*

then reconfigure the package.

dpkg-reconfigure openssh-server

other distributions are similar. you can either reconfigure the package or even reinstall.

johnshen64

Posted 2013-08-26T18:55:54.823

Reputation: 4 399

2

The fingerprint for your machine is most likely located in /etc/ssh under

  • ssh_host_rsa_key, ssh_host_dsa_key or
  • ssh_host_key.pub

You should be able to manually change the file and restart the SSH daemon. A reinstallation of the SSH server should also generate a new host key.

slhck

Posted 2013-08-26T18:55:54.823

Reputation: 182 472