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

ViViDboarder

macrumors 68040
Original poster
Jun 25, 2008
3,447
2
USA
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?
 
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.
 
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.
 
Sorry, it's not as simple as I said earlier. I forgot I had it all set up in a script to do the hard work for me. This is the method: http://www.xsellize.com/showthread.php?t=49097
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
 
Not this is different. In this case, the iPhone connects to your coputer and then open a ssh connection back.

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.

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

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.
 
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.
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
 
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.
 
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.

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.
 
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.
 
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.

Except Cylay costs money. Doesn't it?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.