lunes, 12 de noviembre de 2012

Error Offending key in ~/.ssh/known_hosts file (How To Fix Offending key in ~/.ssh/known_hosts file)

De acuerdo con http://www.thegeekstuff.com/2010/04/how-to-fix-offending-key-in-sshknown_hosts-file/ existen 2 posibles situaciones para que esto suceda.

La primera sucede cuando te conectas  con el servidor por primera vez y será necesario deshabilitar  TEMPORALMENTE configuraciones como se explica en:

http://www.thegeekstuff.com/2010/04/how-to-fix-offending-key-in-sshknown_hosts-file/

Y la segunda cuando se reinstala el sistema operativo en un servidor o el sshd, y tu PC ya contaba con una llave publica. Para esta segunda hay que revisar el mensaje de error que aparece:


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
a7:a8:f2:97:94:33:58:b7:9d:bc:e0:a6:6b:f7:0a:29.
Please contact your system administrator.
Add correct host key in /home/ramesh/.ssh/known_hosts to get rid of this message.
Offending key in /home/ramesh/.ssh/known_hosts: 6
Permission denied (publickey,password).

y usar el siguiente comando para remover la llave guardada en tu PC:


# sed -i '6d' ~/.ssh/known_hosts

Nota: sustituyendo '6' por el número que línea que aparece en el error






No hay comentarios:

Publicar un comentario

Proyectos 2024. Desarrollo de Aplicaciones Móviles. UAT-FIC

Profesor: Dr. Juan José Garza Saldaña   Facultad de Ingeniería y Ciencias Universidad Autónoma de Tamaulipas Los estudiantes de la materia d...