openssh pede dsa

2

Hoje, quando tentei fazer login do meu laptop Linux em um servidor Linux com SSH, recebi a mensagem de erro:

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

Como não alterei as chaves das máquinas, fiz um ssh -v para ver o que acontece. Descobri que meu cliente OpenSSH (SSH-2.0-OpenSSH_7.2p2) aceita o "algoritmo de chave do host: ecdsa-sha2-nistp256", enquanto no meu known_hosts existe um rsa-key para o servidor correspondente (que funcionou bem até hoje. ..).

A única coisa que pode ter mudado é a versão do OpenSSH.

Como posso fazer o OpenSSH solicitar novamente a chave do host RSA?

P.S .: A mensagem de erro e algumas linhas precedentes, conforme solicitado:

debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:k/ADO4oeYIUNdsGBEkKXkggNP5pr3t9QlYSr8GOLSd1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 ECDSA key sent by the remote host is
SHA256:k/ADO4oeYIUNdsGBEkKXkggNP5pr3t9QlYSr8GOLSd1.
Please contact your system administrator.
Add correct host key in /home/nn/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/nn/.ssh/known_hosts:51
  remove with:
  ssh-keygen -f "/home/nn/.ssh/known_hosts" -R server31
ECDSA host key for server31 has changed and you have requested strict checking.
Host key verification failed.
    
por McSvenster 13.09.2016 / 12:14

1 resposta

1

Você pode solicitar um algoritmo de chave de host específico com a opção HostKeyAlgorithms . Na CLI para RSA:

ssh -o HostKeyAlgorithms=ssh-rsa <server>

ou no ~/.ssh/config na seção específica Host :

HostKeyAlgorithms=ssh-rsa
    
por 13.09.2016 / 14:18