readthefuckingmanual.net

[SOLVED] RSA host key for IP address 'w.x.y.z' not in list of known hosts.

Error added: 2007-02-05T22:59:50Z

1 people waiting for the answer...

4 answers found.

Answer 1627 (94.02985% helpful)

Call ssh with the -v switch to learn in which file on which line ssh found a match for the host (with the wrong IP address).
Delete that line in that file, then retry connecting.
Now ssh will ask "Are you sure you want to continue connecting (yes/no)?".
Answer yes, and ssh will generate a new line in the known_hosts file with the correct IP address.
Permalink

Answer 842 (60.869564% helpful)

you can also edit ~/.ssh/known_hosts (or ~/.ssh/known_hosts2) to remove the line for a given host after its IP address changes
Permalink

Answer 1977 (50.0% helpful)

If the known_hosts file contains a record with the correct hostname but no IP address, just append a comma followed by the IP address.
If the _hosts file contains a record with the correct hostname and wrong IP address, just correct the IP address.
Permalink

Answer 643 (20.0% helpful)

rm ~/.ssh/known_hosts
Permalink

Add an answer/solution

If you know the answer, please add your own solution below.
If you don't know, but find out later, please come back and share your answer - there will be other people struggling with this too.


Please enter 61948 here

If you want to be notified via email when this is solved, enter your email address here: