Reinstalling Raspberry Pi OS using a Mac

I recently had to reinstall my Raspberry Pi as motion stopped working for me. Whenever I reinstall the OS of my Raspberry Pi, the IP of my Pi would still reflect the cached ssh-rsa keys from the ~/.ssh/known_hosts file. I’ll see something like this:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
8e:6e:7c:b0:9a:2e:7f:18:2b:9c:5d:7c:4d:5a:83:a9.
Please contact your system administrator.
Add correct host key in /Users/ivonet/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/ivonet/.ssh/known_hosts:26
RSA host key for 192.168.2.100 has changed and you have requested strict checking.
Host key verification failed.

To re-authenticate RSA host key, type this on your mac:

ssh-keygen -R <remembered ip of your pi>

This will remove the cached number and lets you start a new session to be cached by agreeing once more on the command line.

The authenticity of host '192.168.2.100 (192.168.2.100)' can't be established.
RSA key fingerprint is 8e:6e:7c:b0:9a:2e:7f:18:2b:9c:5a:8c:4d:5a:83:a8.
Are you sure you want to continue connecting (yes/no)? yes
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s