Axiso

Notes

SSH – WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

Erreurs — mars 2009 ,

A la connexion vers une machine distante, SSH affiche l’erreur suivante et termine l’action demandée

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
NN:NN:NN:NN:NN:NN:NN:NN:NN:NN:NN:NN:NN:NN:NN:NN.
Please contact your system administrator.
Add correct host key in /home/utilisateur/.ssh/known_hosts to get rid of this message.
Offending key in /home/utilisateur/.ssh/known_hosts:3
RSA host key for www.example.org has changed and you have requested strict checking.
Host key verification failed.

La clef du serveur conservée sur la machine locale ne correspond plus à celle qu’il communique dorénavant.
Cela se produit après la ré-installation d’un serveur et l’avertissement peut alors être ignoré ; uniquement dans ce cas ou après avoir contrôlé ce qui a provoqué cette alerte bien sûr.

Trouver cette ligne dans le message affiché

Offending key in /home/utilisateur/.ssh/known_hosts:3

Notez le dernier numéro.

vi /home/utilisateur/.ssh/known_hosts

Le fichier contient toutes les clefs enregistrées sur la machine locale. Se rendre à la ligne correspondant au numéro précédent (compter à partir de 1 et non de 0).

Ou, pour pointer directement sur la ligne :

vi +11 /home/utilisateur/.ssh/known_hosts

où « +11″ (à remplacer) correspond au numéro de ligne.

Ensuite, l’effacer puis enregistrer le fichier

dd
:wq

SSH – WARNING: /etc/ssh/moduli does not exist, using old modulus

Erreurs — mars 2009 , ,
vi /var/log/auth.log

Le journal affiche cette erreur :

WARNING: /etc/ssh/moduli does not exist, using old modulus

Solution (à vérifier toutefois) :

mkdir /usr/src/openssh
cd /usr/src/openssh
apt-get source ssh
tar xvzf openssh_3.8.1p1.orig.tar.gz
cp openssh-3.8.1p1/moduli /etc/ssh/moduli
cd /
rm -R /usr/src/openssh

A adapter en fonction de la version SSH.