SSH over the internet?

Discussion in 'Jailbreaks and iOS Hacks' started by jknight8907, Mar 3, 2009.

  1. jknight8907 macrumors 6502a

    jknight8907

    Joined:
    Jun 14, 2004
    Location:
    Hudson Valley NY
    #1
    Is it possible to SSH into an iPhone attached to another network? I ask because my sister just bought a JB'd and unlocked 2G, and she wants ringtones and SMS alerts put on, but I would much rather just do it myself from here if I can, as opposed to talking her through it. (She lives 2200 miles and a country away from me)
     
  2. The Admiral macrumors member

    The Admiral

    Joined:
    Mar 2, 2009
    #2
    as long as she is on a network that will accept and forward incoming connections, it shouldn't be any different than SSHing into any other computer. for example, if she is on the most common kind of home broadband setup, she will just need to forward port 22 on her router to her phone and then start the SSH daemon on the phone. then you should be able to connect to the phone by opening an SSH connection to her external IP address.

    some ISPs firewall common service ports. in this case she would need to edit /etc/ssh/sshd_config on the phone and add a "Port" line (like the one reading "Port 22") for another port number, then forward that port instead, and finally restart the SSH daemon to apply the new configuration.

    two critically important security precautions:

    she should be sure to remove the port-forwarding configuration for her phone and stop the SSH daemon after you are finished or it will expose her to brute force attacks. (i don't believe running denyhosts on an iphone would be a wise use of battery)

    don't forget to change the passwords for "mobile" and "root".
     
  3. jknight8907 thread starter macrumors 6502a

    jknight8907

    Joined:
    Jun 14, 2004
    Location:
    Hudson Valley NY
    #3
    Great, thanks! That sounds easy enough to do.
     
  4. ppc750fx macrumors 65816

    Joined:
    Aug 20, 2008
    #4
    Indeed.

    And when you're done, don't forget to tell me your IP. I can always use a spare box. :p
     

Share This Page