Fluid

Terminal: Remote Host Identification Changed for SSH on Mac

I came across this problem when i was hacking my AppleTV. But the problem has to do with key generation on remote hosts. Sometimes the known.hosts file gets corrupted for whatever reason on your local machine and you can no longer connect via SSH to another machine.  If you get this type of an error you can try this little diddy. Fixed me up right quick.  Enjoy!
Problem:  Unable to establish secure shell to remote host generating this error
imac:~ [user]$ scp -r frontrow@AppleTV.local : /mnt/Media ~/Desktop
cp: frontrow@AppleTV.local: No such file or directory
cp: :: No such file or directory
cp: /mnt/Media: No such file or directory
imac:~ [user]$ scp -r frontrow@AppleTV.local:/mnt/Media ~/Desktop/
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
c6:02:d2:…:37:f5.
Please contact your system administrator.
Add correct host key in /Users/[user]/.ssh/known_hosts to get rid of this message.
Offending key in /Users/[user]/.ssh/known_hosts:2
RSA host key for appletv.local has changed and you have requested strict checking.
Host key verification failed.
imac:~ [user]$ scp -r frontrow@AppleTV.local:/mnt/Media ~/Desktop/
The authenticity of host ‘appletv.local (fe80::219:e3ff:fe0f:5170%en1)’ can’t be established.
RSA key fingerprint is c6:02:d2:c8:71:26:27:f7:43:47:7d:7d:dd:b5:37:f5.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘appletv.local fe80::…:5170%en1’ (RSA) to the list of known hosts.
Resolution:
Select your User home folder
Then type : CMD + Shift + G and type ~/.ssh
Then remove the known.hosts file
 
Voila.
Exit mobile version