SSH to iPhone over Edge/3G

Discussion in 'Jailbreaks and iOS Hacks' started by ViViDboarder, Apr 17, 2009.

  1. ViViDboarder macrumors 68040

    ViViDboarder

    Joined:
    Jun 25, 2008
    Location:
    USA
    #1
    Has anyone been able to do this? I set up a DynDNS host for my phone and was wondering if it was even possible for me to SSH to it OverTheAir anyways.

    If it is possible, I was going to try to get a updater daemon running to keep it up to date.

    The point is, those location services to keep tracking your phone location in case you lose it are rough on your battery. Always booting up your gps antennae and pinging their server. With the daemon running, if I lose my phone, or it's stolen, I can just ssh onto it and use a command line app to retrieve the location data as well as recover a lot of my personal information over the air. I'm pretty sure I can remote reboot the phone as well by making it respring and confusing the hell out of the thief.

    So yea, there's a good use for it. Any luck?
     
  2. zyro70 macrumors newbie

    Joined:
    Oct 3, 2008
    #2
    Very good idea, I'd also like to know if this is possible.
     
  3. foob macrumors 6502

    foob

    Joined:
    Feb 17, 2009
    #3
    I do it all the time. You just need your phone's IP address and ssh in the same as always. The problem with doing it with a lost phone is finding the IP.
     
  4. ViViDboarder thread starter macrumors 68040

    ViViDboarder

    Joined:
    Jun 25, 2008
    Location:
    USA
    #4
    This over Edge or 3G
     
  5. calvy macrumors 65816

    Joined:
    Sep 17, 2007
    #5
    I don't know how the other poster was able to do this, but everytime I've tried to SSH to my IP on 3g or EDGE it was met with an Operation Timeout error. No luck for me.
     
  6. foob macrumors 6502

    foob

    Joined:
    Feb 17, 2009
    #6
  7. Tex-Twil macrumors 68020

    Tex-Twil

    Joined:
    May 28, 2008
    Location:
    Europe
    #7
    Not this is different. In this case, the iPhone connects to your coputer and then open a ssh connection back.

    The OP wants to know if it's possible to ssh directly to the iPhone over 3G. I aslo asked the same question here.

    Tex
     
  8. foob macrumors 6502

    foob

    Joined:
    Feb 17, 2009
    #8
    It's not that simple. It only connects to the computer to set up a reverse tunnel and the session can then be closed. Then you can ssh to the phone whenever you want until the IP changes.

    I doubt any carrier has their network set up to allow ssh connections that way. But using the method I linked, it's just one extra step which you can automate and get what the OP wants.
     
  9. Tex-Twil macrumors 68020

    Tex-Twil

    Joined:
    May 28, 2008
    Location:
    Europe
    #9
    It is quite simple.

    What you call a "session" is probably the Terminal.app. It looks like if you close it, the ssh connection from the iPhone to the computes remains open. But when the ssh connection get closed (iPhone reboot or any process kill/hang or any other reason) you won't be able to connect to the iPhone.

    So the IP change is far from being the only reason for this to fail.


    On the other hand it looks like it's the only solution :)

    Tex
     
  10. foob macrumors 6502

    foob

    Joined:
    Feb 17, 2009
    #10
    Putting it in a startup script takes resprings/reboots out of the equation so you're only worry is an IP change or some random crash, the latter of which can't really be avoided.
     
  11. ViViDboarder thread starter macrumors 68040

    ViViDboarder

    Joined:
    Jun 25, 2008
    Location:
    USA
    #11
    If iDNS would work we'd be doing away with the IP issue... So close...

    Actually, one of the reasons I wanted to do this was to create my own phone recovery script. I think it could still work. My script would sleep and then wget a webpage every hour or so to check if I labeled my phone as LOST. If it was it would then be able to get the location and then run the reverse tunnel script that was posted (I'm assuming, I haven't looked at it yet) so that I could get command line access.

    I'll check it out when I get a chance.
     
  12. scootaru macrumors 6502

    Joined:
    Nov 7, 2008
    Location:
    Columbus, OH
    #12
    Maybe you should re-think your implementation strategy. The Cylay app in cydia does what you want your phone to do except I believe it uses push notifications to accomplish those tasks.
     
  13. darngooddesign macrumors G3

    Joined:
    Jul 4, 2007
    Location:
    Atlanta, GA
    #13
    Do it over USB with PhoneView or iPhoneBrowser.
     
  14. ViViDboarder thread starter macrumors 68040

    ViViDboarder

    Joined:
    Jun 25, 2008
    Location:
    USA
    #14
    Except Cylay costs money. Doesn't it?
     

Share This Page