Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

BornToMac

macrumors 6502a
Original poster
Jan 28, 2008
622
0
So I have connected to my 2.2.1 iPhone 3G using open ssh in the past. I use Fugu on my Mac to connect to my iphone. Ever since I uploaded to 3.0, I get the "remote host identification has changed" on my Mac and the connection fails. I assumed that during the restore process of updating to 3.0 and re-JB'ing, the password was reset to alpine. When I opened Terminal and typed in ssh root@<ip.xxx.x.x> to change it, i get:

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
x1:x2:x3:x4:x5:x6:x7:x8:x9:x8:x7:x6:x5:x4:x3:x2 (obviously this isn't it).
Please contact your system administrator.
Add correct host key in /Users/xxxxxx/.ssh/known_hosts to get rid of this message.
Offending key in /Users/xxxxxx/.ssh/known_hosts:1
RSA host key for xxx.xxx.x.x has changed and you have requested strict checking.
Host key verification failed.
Macintosh-3:~ xxxxxx$

This is frustrating and I can't quite figure out how to add my correct host key it is asking for. Can anyone give me some guidance plz?
 
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
x1:x2:x3:x4:x5:x6:x7:x8:x9:x8:x7:x6:x5:x4:x3:x2 (obviously this isn't it).
Please contact your system administrator.
Add correct host key in /Users/xxxxxx/.ssh/known_hosts to get rid of this message.
Offending key in /Users/xxxxxx/.ssh/known_hosts:1
RSA host key for xxx.xxx.x.x has changed and you have requested strict checking.
Host key verification failed.
Macintosh-3:~ xxxxxx$

This is frustrating and I can't quite figure out how to add my correct host key it is asking for. Can anyone give me some guidance plz?

What's happened is that during the 3.0 (re)install the iphones "digital fingerprint" has changed. So ssh cannot be sure that this is the right device and bombs out.

Two ways around this:
1. Delete the first line of the known_hosts file (or delete the entire file).
2. Disable strict host key checking (can be done in ssh_config).

Deleting the line or file is the easiest way. You will get asked to verify the host key (the yes/no do you want to connect question) but after this it won;t appear again unless the key changes again..
 
Thanks! I will try it this weekend. Hope I can make it work, need access to finish setting up.
 
Not to sound stupid, but where do I find the known hosts file? I assumed I would go to mac HD>Users/etc. etc. but I cant find it. I access it in terminal?
 
Also, my iphone password was reset to alpine when I restored correct?
 
NVM. I was, indeed being stupid. I have figured it out and am now able to ssh into my phone. Thanks!!!:D
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.