SSH / Connection problem after update to 3.0

Discussion in 'Jailbreaks and iOS Hacks' started by BornToMac, Jun 30, 2009.

  1. BornToMac macrumors 6502a

    BornToMac

    Joined:
    Jan 28, 2008
    #1
    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?
     
  2. BornToMac thread starter macrumors 6502a

    BornToMac

    Joined:
    Jan 28, 2008
  3. hippojay macrumors newbie

    Joined:
    Jun 10, 2009
    #3
    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..
     
  4. BornToMac thread starter macrumors 6502a

    BornToMac

    Joined:
    Jan 28, 2008
    #4
    Thanks! I will try it this weekend. Hope I can make it work, need access to finish setting up.
     
  5. BornToMac thread starter macrumors 6502a

    BornToMac

    Joined:
    Jan 28, 2008
    #5
    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?
     
  6. BornToMac thread starter macrumors 6502a

    BornToMac

    Joined:
    Jan 28, 2008
    #6
    Also, my iphone password was reset to alpine when I restored correct?
     
  7. BornToMac thread starter macrumors 6502a

    BornToMac

    Joined:
    Jan 28, 2008
    #7
    NVM. I was, indeed being stupid. I have figured it out and am now able to ssh into my phone. Thanks!!!:D
     

Share This Page