Remove key from known_hosts
-
Remove key from known_hosts file:
Open the terminal and type the following command:
For all examples below just replace the value after -R:
ssh-keygen -R server-name ssh-keygen -R server.ip.addre.ss ssh-keygen -R 202.54.1.5 ssh-keygen -R server1.example.com
Example Output:
root@AWX0708:~# ssh-keygen -R 10.196.0.1 # Host 10.196.0.1 found: line 8 # Host 10.196.0.1 found: line 9 # Host 10.196.0.1 found: line 10 /root/.ssh/known_hosts updated. Original contents retained as /root/.ssh/known_hosts.old root@AWX0708:~# ssh ansible@10.196.0.1