Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am trying to see if I can SSH to my iPhone using the 3G network. So, given my IP, I am trying to make contact through SSH, using the defined port (which is no longer 22, I changed it).

It all works fine on my private wifi network. For some reason, it doesn't on 3G...

Any ideas ?

Thanks

share|improve this question

migrated from superuser.com May 2 '12 at 13:51

This question came from our site for computer enthusiasts and power users.

5  
3G services are often on private addressed networks, and use NAT to get out to the internet. What IP is your phone getting on 3G (and I mean the phone itself, not what you see on whatismyip.com) –  Paul May 2 '12 at 12:30
    
It's possible on remote, normal networks, but I've never tried/heard of being able to access servers that are hosted over cellular data. –  Andrew Larsson May 2 '12 at 23:02
    
If a NAT is used (and it surely is used - I can get only 3 different IP addresses by reconnecting), then how are ports managed? Skype uses port 80, email is used for email ports, and all online games - need a port to function ? –  Ted May 3 '12 at 12:10

2 Answers 2

a) Unless you have jailbroken your device, iOS doesn't have an SSH server to run.

b) If you have jailbroken your device, it will not be possible to SSH into your iPhone over cellular. You are behind one of the most complex NAT setups there is. When you move between towers, and lose signal, you lose your lease to a unique ID with the cellular network (like an IP). However, every time your connection is re-established with your carrier, you're connected to a new tower and your connection is routed differently through another NAT and finally out somewhere, probably in another state.

In researching this alone, over the course of 10 minutes, my iPhone returned 2 different IPs from the internet, one in Florida, one in Pennsylvania.

Short answer: Wi-Fi = yes | Cellular = no

share|improve this answer

Yes, you can, if you use a VPN service, that assigns you a real, unmasked IP address (which will be accessible from the internet) or a VPN to your local network.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.