A
A
AlizonJohn2018-05-17 10:09:49
SSH
AlizonJohn, 2018-05-17 10:09:49

The fingerprint of the ssh server has changed, how to return the old one?

Hello! The problem is this - there is a server on Debian 9, reverse ssh was forwarded to it from a remote computer (it is registered there in autorun) with access by key. Foolishly, I reinstalled the system, and the debian fingerprint changed accordingly. Now, when I log in from my home computer, I see this message.

ssh-rsa host key mismatch for 107.161.31.21 !
Fingerprint is md5 0c:99:e7:97:8b:71:7c:d7:9a:97:8b:39:f8:9e:a4:2b
Expected md5 81:66:2b:66:a3:85:07:ad:15:7f:63:43:4b:df:e5:1f
If you know that the host key is correct you can
remove the bad entry from ~/.ssh/known_hosts

Although I have the private and public keys, and I uploaded the public key to the server in ~/root/.ssh, I still get a fingerprint mismatch message.
Naturally, now the remote PC is missing in the connections on the server. I don't have access to this computer right now, but I really need it. Question - is it possible to return the Fingerprint value somehow?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2018-05-17
@saboteur_kiev

You don't need to restore. You need to delete the snapshot that you have saved from the old server key, and add a new one when connecting.
That is,
ssh-keygen -R 107.161.31.21
and log in again, adding a new snapshot to the list of known hosts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question