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

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.

  • 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 '16 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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