Remote Host Identification Has Changed error and solution

Remote Host Identification Has Changed error and solution

When we run scp command  to copy data to remote host its gives us error

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!

Solution is

$ ssh-keygen -R {server.name.com}
$ ssh-keygen -R {ssh.server.ip.address}
$ ssh-keygen -R server.example.com

sample output

root@webserver html]# ssh-keygen -R 192.168.1.10
/root/.ssh/known_hosts updated.
Original contents retained as /root/.ssh/known_hosts.old

source ssh error

Leave a Comment