0

I am using a pi3 with raspbian and when setting it up it gives me the Host identification warning- @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @

so I try to remove the SSh keys so it gives me a bad remote forwarding specification warning now what do I do?

I am using a mac

2 Answers 2

1

You should remove the line that corresponds to the RPi in the known_hosts file, as @Milliways has already commented.

Open a terminal and run nano ~/.ssh/known_hosts to open the file. Remove the line for your RPi, save the file, and attempt to reconnect. You should be prompted to store the new key.

Alternatively you can manually add the new key to the known_hosts file, but that is a bit more complicated.

See: https://serverfault.com/questions/321167/add-correct-host-key-in-known-hosts-multiple-ssh-host-keys-per-hostname

0

You can remove the old key using

ssh-keygen -R your_ip

from your cache. Turning of StrictHostKeyChecking is not a good practice and once you already have the key in the cache, it won't help, unless you remove it using the above command.

1
  • It works fine if you also use UserKnownHostsFile=/dev/null when you connect to local nodes. Telling people this is not a good practice on a (presumably encrypted) home WLAN is not a good practice. You might as well tell them their entire LAN is not to be trusted, to return their router to their ISP, and to stay away from the internet and computers period. Your methodology requires the use of static IPs, which on most home LANs is not a good practice either -- and what's more, impractical, which disabling host key checking is not.
    – goldilocks
    Jul 16, 2016 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.