Boa tarde, segue em anexo o erro que me retorna quando tento copiar minha chave publica para outra m

1. Boa tarde, segue em anexo o erro que me retorna quando tento copiar minha chave publica para outra m

Daniel Vinicius
Daniel2003

(usa Linux Mint)

Enviado em 06/01/2022 - 15:18h

ssh-copy-id -i /home/danielvadf/.ssh/id_rsa.pub danielvadf@192.168.0.11
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/danielvadf/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/usr/bin/ssh-copy-id: ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ERROR: @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ERROR: IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
ERROR: Someone could be eavesdropping on you right now (man-in-the-middle attack)!
ERROR: It is also possible that a host key has just been changed.
ERROR: The fingerprint for the ECDSA key sent by the remote host is
ERROR: SHA256:1NQvXGhV2ijWZgmMOkZdsz30H9ztRQZs7jjvhDw460w.
ERROR: Please contact your system administrator.
ERROR: Add correct host key in /home/danielvadf/.ssh/known_hosts to get rid of this message.
ERROR: Offending ECDSA key in /home/danielvadf/.ssh/known_hosts:4
ERROR: ECDSA host key for 192.168.0.11 has changed and you have requested strict checking.
ERROR: Host key verification failed.
Alguem sabe como resolver esse erro ?


  


2. Re: Boa tarde, segue em anexo o erro que me retorna quando tento copiar minha chave publica para outra m

JOAO PAULO SCOPEL
joaopauloscopel

(usa Ubuntu)

Enviado em 04/04/2022 - 20:52h


Esse erro é porque já existe outra chave cadastrada para este host no authorized_keys do host destino, e você está tentando conectar copiando uma chave diferente para o mesmo host.

Vai no host de destino, no diretório home do usuário que vai receber a cópia da chave SSH, edite o arquivo authorized_keys e remova a chave do host de origem.

Feito isso, salve o arquivo e tente novamente com o ssh-copy-id.

Se for laboratorio, mova o arquivo authorized_keys para outro diretório ou remova, que tambem irá resolver.

Atenciosamente,

"Com grandes poderes vem grandes responsabilidades."