Eu reinstalei o sistema operacional do meu servidor remoto, e agora, quando tento ssh root@myserverIP da minha máquina local, recebo:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:xxxxxxxxxxx.
Please contact your system administrator.
Add correct host key in /var/root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /var/root/.ssh/known_hosts:3
ECDSA host key for xxx.xxx.xxx.xxx has changed and you have requested strict checking.
Host key verification failed.
( xxx é apenas para ocultar as informações reais)
Em vez de alterar a chave, optei pela exclusão total de todo o conteúdo em .ssh/known_hosts , esperando ser solicitado a adicionar a chave novamente. Mas, em vez disso, ainda recebo o mesmo erro.
Então, eu até tentei remover a chave única manualmente:
ssh-keygen -R xxx.xxx.xxx.xxx
E, claro, não está lá, pois known_hosts está agora vazio:
Host xxx.xxx.xxx.xxx not found in /Users/xxx/.ssh/known_hosts
No entanto, ainda estou recebendo o mesmo erro várias vezes. Isso é intrigante - onde ssh obtém as informações se known_hosts estiver em branco?
Claro que reiniciei o meu Mac e até descarreguei a cache. Talvez ssh esteja usando outro known_hosts ? Mas onde é isso? Eu tentei locate , mas não consigo encontrar nenhum outro arquivo known_hosts na minha unidade.
O que estou fazendo de errado? Como posso resolver isso?