+ Reply
Page 2 of 2 FirstFirst 12
Results 21 to 36 of 36

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Connect and control your iPhone from anywhere SSH/VNC

is a discussion within the

iPhone / iPod Touch SDK | Development Discussion

forums, a part of the

3rd Party Apps For iPhone | iPod Touch

section;
Hi, The top of your script is fine. It should start with #!/bin/sh. The 'push' idea I mentioned is purely theoretical. Instead of starting autossh at boot time, I'd like
...
  1. #21
    What's Jailbreak?
    Join Date
    Sep 2009
    Posts
    6
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Hi,

    The top of your script is fine. It should start with #!/bin/sh.

    The 'push' idea I mentioned is purely theoretical. Instead of starting autossh at boot time, I'd like to start it on demand. I'd want to send a message to the phone using APN (maybe via Prowl?), and catch the event on the phone (using GRiP?) to start autossh.

    Please look up any terms you're not familar with.

    -

    Regarding the change of IP, you are right, I'm seeing the same behaviour. There is a period of time where the tunnel is still up, but on the wrong interface. It is possible to send a signal to autossh (via killall) to tell it to renew the connection manually, but that is not desirable.

    If the tunnel is started from the data side (Edge/3G), then I believe it's a little better. The tunnel still doesn't switch to wifi, but at least it doesn't go down.

    Regards,
    Lionel.

  2. #22
    Green Apple
    Join Date
    Jul 2009
    Posts
    30
    Thanks
    8
    Thanked 3 Times in 3 Posts

    PERFECT!!

    I coundt say it any better, i wish i had the ability to explain a situation (the IP/3G/WIfi glitch) as well as yourself... by all means, take over ;P...

    i was just upset u didnt reference my nickname in any way, if u really have been using this for a long time, and u know other people who have, thats great...

    but as far as i knew, No one (even on android) didnt know how to run a server accessible by public (specific servers only obv) over 3G on the iPhone/other phones....

    but u obviously deserve major cutos for realizing what i did =)

  3. #23
    What's Jailbreak?
    Join Date
    Jun 2008
    Posts
    11
    Thanks
    0
    Thanked 4 Times in 2 Posts

    If someone with the know-how would be willing to automate these tasks via a Cydia app for the rest of us tards that would be awesome.

    Related question: is there also a way to trigger the iphone's native VPN client at startup and have it auto reconnect?
    [EDIT] Tried fooling around with com.apple.raccoon.plist but no go. It looks like there are a couple of options in there for VPN auto-starting and keeping-alive that are set to false. Switching to 'true' didn't produce any noticeable change on restart. Ok ending edit, sorry for momentary hijack.[/EDIT]
    Last edited by ddarko777; 09-24-2009 at 02:03 AM. Reason: more info

  4. #24
    Green Apple
    Join Date
    Jul 2008
    Posts
    35
    Thanks
    3
    Thanked 2 Times in 2 Posts

    I love the idea of this.

  5. #25
    What's Jailbreak?
    Join Date
    Jun 2008
    Posts
    11
    Thanks
    0
    Thanked 4 Times in 2 Posts

    Lightbulb veency working over 3G on demand!
    FYI, I got veency working over 3G on demand =)

    It doesn't involve using VPN but that did set me on the right track to discovering what I needed to do... essentially, overcoming the reason why veency doesn't work over 3G in the first place. Get a public IP!

    Full details of my experience posted here:
    Veency over 3G/Edge working w/ iDNS

  6. #26
    iPhoneaholic plcrules's Avatar
    Join Date
    Dec 2008
    Location
    New York, New York
    Posts
    372
    Thanks
    40
    Thanked 23 Times in 15 Posts

    ok i get connection refused any help?

  7. #27
    What's Jailbreak?
    Join Date
    Dec 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default quick question
    can the ssh server be run on another pc connected to the same network as the pc i am trying to connect to?

  8. #28
    What's Jailbreak?
    Join Date
    May 2012
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    [...]

    Post removed.
    Last edited by egregious; 05-22-2012 at 11:33 PM.

  9. #29
    What's Jailbreak?
    Join Date
    May 2012
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default iPhone app to controll autossh tunnels
    Quote Originally Posted by michaelwithe21 View Post
    UPDATE: it seems if im connected to 3G then i swap to WiFi, the existing tunnel remains, but I am unable to connect.
    Yes. When switching to WiFi, are you on the same local network as your 'remote' host? This causes a routing fubar when trying to get to your 'external ip' from the internal network. This problem can be avoided by statically routing all traffic from your iPhone to your remote host via data/3g:

    1) Get your data ip address from SBSettings or 'ifconfig' command on iPhone
    2) Do this command:

    Code:
    route add yourHost your.data.ip.address
    yourHost can either be a hostname (nice if you use dynamic dns) or ip address if you know it, and of course your.data.ip.address is the ip address for your phone.


    Hey all,

    I am going to write an iPhone app to automate all of this stuff and would welcome the assistance of folks with some iOS programming experience. If interested, or if you have feature requests, please drop me a line. Basic features I'm thinking of include:

    * SBSettings toggle
    * Add/remove tunnels individually
    * Allow initiation at phone startup
    * Include a miniature website via lighttpd with features TBD...

    Cheers,

    eeg.
    Last edited by egregious; 06-05-2012 at 07:40 PM.

  10. #30
    What's Jailbreak?
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default iphone screen
    my iphone is connected with a switch and switch is connected to a lan...im trying to access the iphone screen with my computer which is connected in the same network but with wifi...so how to do that...
    how to do port forwarding on it so that i can get the screen...like adb command in andorid

  11. #31
    What's Jailbreak?
    Join Date
    May 2012
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Quote Originally Posted by dummycreated View Post
    my iphone is connected with a switch and switch is connected to a lan...im trying to access the iphone screen with my computer which is connected in the same network
    This question is a bit off-topic for this thread, but... To access your 'screen', you need A) A jailbroken iPhone, B) the 'Veency' package from cydia and C) VNC viewer for your 'computer' -- Google 'realvnc' and you will find installs for windows/osx/linux/etc.

    Since your phone and your 'computer' are on the same network, you should be able to point your VNC viewer to your iPhone's wifi ip address. Don't know that? Look in SBSettings. Don't know about that? I can't help if that is the case...

  12. #32
    What's Jailbreak?
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DUDE i had already those things installed.....my question i want to actually do port forwarding.....so that whenever i do localhost even if the wifi & 3g is turnoff i should able to get the screen. please help...please sir..please help
    Quote Originally Posted by egregious View Post
    This question is a bit off-topic for this thread, but... To access your 'screen', you need A) A jailbroken iPhone, B) the 'Veency' package from cydia and C) VNC viewer for your 'computer' -- Google 'realvnc' and you will find installs for windows/osx/linux/etc.

    Since your phone and your 'computer' are on the same network, you should be able to point your VNC viewer to your iPhone's wifi ip address. Don't know that? Look in SBSettings. Don't know about that? I can't help if that is the case...

  13. #33
    What's Jailbreak?
    Join Date
    May 2012
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Post Removed
    Last edited by egregious; 06-23-2012 at 02:06 PM. Reason: Removed

  14. #34
    What's Jailbreak?
    Join Date
    May 2012
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Post Removed
    Last edited by egregious; 06-23-2012 at 02:07 PM.

  15. #35
    What's Jailbreak?
    Join Date
    May 2012
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Quote Originally Posted by dummycreated View Post
    My question i want to actually do port forwarding.....so that whenever i do localhost even if the wifi & 3g is turnoff i should able to get the screen.
    Okay... I'll give you the three scenarios:

    A) If your phone is on wifi:
    you don't need to map a port -- you can go direct.
    B) If your phone is not on wifi, but is on data/3g:
    You can open a port as follows: From mobileTerminal on your iPhone, do: ssh -R *:59000:localhost:5900 username@yourComputer
    ...where 59000 = the local port number you want to use, username = user name on your computer and yourComputer = your computer's external ip address or domain name. This assumes that you have configured your router to direct port 22 (ssh) to your computer. This is very way off-topic, so if you need help with that, private message me and I can walk you through it. After all of that, simply point your VNC viewer to localhost:59000 and you're good to go.
    C) If your iPhone is using neither wifi or data/3g:
    The only way to connect would be via USB (or bluetooth, but I can't help you there). There are basic instructions for this here. In your case, you would run tcprelay.py -t 5900:59000 again, where 59000 is the local port number you want to use. You can then point VNC viewer to localhost:59000.

    Does that cover it?

  16. #36
    What's Jailbreak?
    Join Date
    Aug 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    test

    edit - sorry please delete

+ Reply
Page 2 of 2 FirstFirst 12
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts