Control your iPhone from anywhere
MobileTerminal.app can do what I am about to demonstrate... but...
What I am looking to find an app that will allow me to save a reverse SSH command that will activate at the iPhone's boot... allowing me to login to my iphone from my home computer (SSH server) no matter where my iphone goes in the world... if someone steals it, just connect to my computers localhost port from my iphones tunnel 5900 over 3G from your home internet... This is still quite new, so if there is already an app that can give launch termianl apps at iphone start up let me know... this same function that I will demonstrate below works with SSH and VNC to the iPhone without WiFi or a cable or a device link:
Note: ignore the "untested veency" part, I have tested it, and it works fine
We can all SSH and VNC to our phones using openSSH and Veency (3G having problems with Veency) via WiFi or WiFi device (in some cases a cable)...
But what I am here to prepose (tested though) is a command via the MobileTerminal.app within the jailbroken iphone that can created a REVERSE SSH connection using the 3G internet (Edge not tested).
Here is what you will need to control your iPhone no matter where it goes (stolen or not):
Jailbroken iPhone with cydia
OpenSSH installed on phone
Veency (untested because I am using a 3G)
Mobile Terminal.app installed on phone
An SSH server running on the computer/device you want to use to remotely access your iPhone (preferably on a port other than 22 for security and other reasons)
Forward a port (or DMZ) to your local IP and SSH port (only if using a router)
Once you have all those things...
open MobileTerminal.app within iPhone, login to root using alpine as the password (change later using passwd command) NOTE: you may also use mobile user name with same alpine password). You can do this by typing "login root", enter, then "alpine" as the password.
If you are logged in as root type the following ignoring the ( ) 's and placing the correct characters in place of them:
ssh -p (SSHPORT#) (User\ Name)@(Domain/IP of SSH computer) -R 1201:localhost:22
NOTE: you can change the 1201 port to anything you prefer, make sure to change in further steps...
Once it connects, you will have to type "yes" for the first time connecting, type your password for your computer... If you see you are now logged into your home computer via your iPhone, you can close the terminal via the home button (you do not need to run backgrounder for the terminal to stay connected) and continue to the next steps..
That command above forwarded the iPhone's SSH protocol/port to your localhost's computer's port, allowing you to login to the iPhone's SSH server by entering the following into your Mac/PC's Terminal CLI:
ssh -p 1201 root@localhost
vwalla, you have now connected to your iPhone's SSH server via its own SSH IP within a reverse tunnel...this method can be used to bypass any routers or firewalls set up by ATT
This same method can be used once VEENCY is installed using port 1202:localhost:5900... meaning!!!
YOU CAN CONNECT TO YOUR iPHONE's VNC and SSH server no matter where it goes, as long as you run an SSH server from your home (or other) computer!!!
am i the first to see this?
Questions for smart people =)
1) Is there a way for me to add this reverse command to my iPhone's startup? this would allow me to always connect to it even if the thief turns it off and then on.
2) Would this command work if they changed the sim card after stealing my phone?
3) This command may need to be ran every time the 3G IP changes, but as far as I can tell, SSH tunnels stay open even if the user turns off 3G and then turns it back on, as long as the IP is the same and the source is the same... IS THERE ANYTHING ELS WE CAN DO WITH THIS SSH Reverse Tunnel via 3G internet?
4) almost forgot... Is there anyway to do a reverse Proxy command from the iPhone Terminal... basically tethering my IP via my home computers internet... example:
ssh user@homecomputer -D 9999
i have tried things like ssh user@homecomputer -RD 9999 with no luck.. any ideas? I know there are other ways to tether your internet that involve connecting to a device via WiFi... but thats too easy =P
please correct me if im wrong... but this opens up new doors to the iPhone's 3G network and iPhone capabilities!
Leave a comment if you have any defiant answers or questions, otherwise, if you are feeling special, email me at michael_withe21@hotmail.com with any questions or answers to my genius idea... or if you want to claim doing it before me =)
MobileTerminal.app can do what I am about to demonstrate... but...
What I am looking to find an app that will allow me to save a reverse SSH command that will activate at the iPhone's boot... allowing me to login to my iphone from my home computer (SSH server) no matter where my iphone goes in the world... if someone steals it, just connect to my computers localhost port from my iphones tunnel 5900 over 3G from your home internet... This is still quite new, so if there is already an app that can give launch termianl apps at iphone start up let me know... this same function that I will demonstrate below works with SSH and VNC to the iPhone without WiFi or a cable or a device link:
Note: ignore the "untested veency" part, I have tested it, and it works fine
We can all SSH and VNC to our phones using openSSH and Veency (3G
But what I am here to prepose (tested though) is a command via the MobileTerminal.app within the jailbroken iphone that can created a REVERSE SSH connection using the 3G internet (Edge not tested).
Here is what you will need to control your iPhone no matter where it goes (stolen or not):
Jailbroken iPhone with cydia
OpenSSH installed on phone
Veency (untested because I am using a 3G
Mobile Terminal.app installed on phone
An SSH server running on the computer/device you want to use to remotely access your iPhone (preferably on a port other than 22 for security and other reasons)
Forward a port (or DMZ) to your local IP and SSH port (only if using a router)
Once you have all those things...
open MobileTerminal.app within iPhone, login to root using alpine as the password (change later using passwd command) NOTE: you may also use mobile user name with same alpine password). You can do this by typing "login root", enter, then "alpine" as the password.
If you are logged in as root type the following ignoring the ( ) 's and placing the correct characters in place of them:
ssh -p (SSHPORT#) (User\ Name)@(Domain/IP of SSH computer) -R 1201:localhost:22
NOTE: you can change the 1201 port to anything you prefer, make sure to change in further steps...
Once it connects, you will have to type "yes" for the first time connecting, type your password for your computer... If you see you are now logged into your home computer via your iPhone, you can close the terminal via the home button (you do not need to run backgrounder for the terminal to stay connected) and continue to the next steps..
That command above forwarded the iPhone's SSH protocol/port to your localhost's computer's port, allowing you to login to the iPhone's SSH server by entering the following into your Mac/PC's Terminal CLI:
ssh -p 1201 root@localhost
vwalla, you have now connected to your iPhone's SSH server via its own SSH IP within a reverse tunnel...this method can be used to bypass any routers or firewalls set up by ATT
This same method can be used once VEENCY is installed using port 1202:localhost:5900... meaning!!!
YOU CAN CONNECT TO YOUR iPHONE's VNC and SSH server no matter where it goes, as long as you run an SSH server from your home (or other) computer!!!
am i the first to see this?
Questions for smart people =)
1) Is there a way for me to add this reverse command to my iPhone's startup? this would allow me to always connect to it even if the thief turns it off and then on.
2) Would this command work if they changed the sim card after stealing my phone?
3) This command may need to be ran every time the 3G IP changes, but as far as I can tell, SSH tunnels stay open even if the user turns off 3G and then turns it back on, as long as the IP is the same and the source is the same... IS THERE ANYTHING ELS WE CAN DO WITH THIS SSH Reverse Tunnel via 3G internet?
4) almost forgot... Is there anyway to do a reverse Proxy command from the iPhone Terminal... basically tethering my IP via my home computers internet... example:
ssh user@homecomputer -D 9999
i have tried things like ssh user@homecomputer -RD 9999 with no luck.. any ideas? I know there are other ways to tether your internet that involve connecting to a device via WiFi... but thats too easy =P
please correct me if im wrong... but this opens up new doors to the iPhone's 3G network and iPhone capabilities!
Leave a comment if you have any defiant answers or questions, otherwise, if you are feeling special, email me at michael_withe21@hotmail.com with any questions or answers to my genius idea... or if you want to claim doing it before me =)