4 décembre 2018

SSH Offending RSA key in known_hosts

Quand on se connecte à un serveur SSH dont l’IP est déjà renseignée dans le fichier known_hosts mais avec une clé RSA différente, ce message d’erreur peut alors s’afficher :

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:8o4KfV52XjdZzBCXrAvW2VECFJsPmmNvF5SUMRKsW5s.
Please contact your system administrator.
Add correct host key in /Users/nom_d’user/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/nom_d’user/.ssh/known_hosts:95
RSA host key for xxx.xxx.xxx.xxx has changed and you have requested strict checking.
Host key verification failed.

 

Il faut donc éditer le fichier know_hosts du client avec lequel vous essayez de vous connecter. Ce fichier se trouve ici, sous Linux :

/home/nom_d’user/.ssh/known_host

Sous MacOS :

/Users/nom_d’user/.ssh/known_host

 

Éditez-le puis supprimez tout bonnement la ligne qui contient l’IP incriminée.

Share

You may also like...

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *


The reCAPTCHA verification period has expired. Please reload the page.