Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
MobileMe runs you ~$60 on amazon, or $5 a month for a pinpoint on a map showing where your phone is, remote wipe, back to my mac, etc.
 
MobileMe runs you ~$60 on amazon, or $5 a month for a pinpoint on a map showing where your phone is, remote wipe, back to my mac, etc.

do not advertise products on this thread... they are charging for a FEATURE that is already built-in... sounds like something windows would do =P... Manually running your own server takes advantage of the same technology that MobileMe is using to charge you a yearly fee for.

Go pay for your email two because it has a "delete" function...lol...

This method allows more than MobileMe offers, including FULL control over iPhone screen and TRUE GPS location with Terminal access, offering more options to delete and watch iphone filesystem...

Personally, i want to see what the thief does with my phone, and hopefully he will give some incriminating evidence via this connection... I can chose to shut him down at any time, by using killall commands and rm commands.

PLEASE KEEP THE TOPIC STRAIT =P

EDIT: lol, i just noticed he has a MBP, MBA, mini, iphone 3g, iphone 3g S AND ipod touch... no wonder he likes MobileMe, he buys everything apple sells =P

When 4G is out, this actually may become functional enough to use as a form of connecting to your iPhone all the time... of course if the thief is using wifi this will show realtime screen refresh with almost no lag.... but for right now, this could be implemented into an app or startup command for the iPhone and be used for very slow screen control and location awareness (assuming 3G only). Which is better than not knowing where your iphone is... IE: DONT TAKE THINGS PERSONALLY =D
 
After a little digging around, I have found these changes needing to be made:

1) /etc/ssh/sshd_config
-> Best to change port here (though it isnt used i guess...)
2) /Library/LaunchDaemons/com.openssh.sshd.plist
->change the service ssh to ssh2
3) /etc/services
-> add in your service ssh2 for both udp and tcp with appropriate ports


The iPhone aparently uses the Launcher Daemon to launch certain processes whenever a port is probbed. In this case, ssh is bound to 22 by the /etc/services file.
I think by changing that to invoke a different service, the phone would then use that new port. However, this seems to not quite work for me, I think i am missing one more place to change it maybe?
 
After a little digging around, I have found these changes needing to be made:

1) /etc/ssh/sshd_config
-> Best to change port here (though it isnt used i guess...)
2) /Library/LaunchDaemons/com.openssh.sshd.plist
->change the service ssh to ssh2
3) /etc/services
-> add in your service ssh2 for both udp and tcp with appropriate ports


The iPhone aparently uses the Launcher Daemon to launch certain processes whenever a port is probbed. In this case, ssh is bound to 22 by the /etc/services file.
I think by changing that to invoke a different service, the phone would then use that new port. However, this seems to not quite work for me, I think i am missing one more place to change it maybe?

man, i did my own "digging" and couldnt find ISH! i suck at research =P

The etc services is one of the txts needed to be picod while changing default listening port on mac ssh... hmm i will try your method, and see how many other similarities i can find with the mac vs iphone process...

know if i can get pico on my iphone? i installed some terminal utilities via cydia, but pico dont work... i could do some digging, but im too lazy... hoping someone els has already done it =P

LOL, i just typed in iphone pico and got this, but i dunno if this is after he did something more...:

Over on #iphone-shell, user Doggkruse was wondering how to get pico to work on his iPhone. Problem was that the iPhone had no terminal definitions on-board. So every time he ran pico, he got "Unknown termtype vt100" errors. For those of you curious how to fix this problem, here's the solution. On your iPhone, create the folder /usr/share/terminfo/76 and copy /usr/share/terminfo/76/vt100 from your Mac over to the iPhone. Once there, set your term environment variable to vt100. In csh, this is set term=vt100. It varies, obviously, by shell. Once this is done, you should be able to use pico in normal full-screen mode. For those of you full-screen addicts, there's now vim and pico. For the rest of us, there's ed--the editor of kings. User DrunkDwarf was nice enough to put up a copy of vt100 for Windows users here. Thanks DrunkDwarf!

PS: people should be checking "netstat" on their iphone terminal... im seeing alot of weird connections established
 
UPDATE: it seems if im connected to 3G then i swap to WiFi, the existing tunnel remains, but I am unable to connect. ONCE I SWITCH BACK, WITHOUT RE-EXECUTING THE COMMAND, the tunnel is still connected and allows remote access. So I tried the other way, WiFi first, execute, then switched to 3G and then activated Wifi again, Tunnel remained!! interesting!! but if the source changes and doesnt return to the IP of the original "command giver's" IP address, the command will need to be executed again:

Seems this is something that an hourly process can fix... the process could run every hour, or somehow know when the internet source changes, whether it be to wifi, 3g or edge... Before the tunnel is re-created, the old "tunnel" would have to be closed via terminal/command, assuming you CANT use the same port to forward to (1201 in this case) while the localhost still sees it as connected. An hourly process would not be battery consuming and would allow for higher chances of getting phone back. NOTE: This will have to use a NoPassword DSA/RSA key, iphone supports all bits. DSA is known to be safer and has "never" been "cracked" =P
 
personally i use vi/vim for text editing, so cant help you with your pico problem.

on another note, i should research how it is done one mac, probably easier than reinventing the wheel.

when you switch to wifi, your phones IP changes, therefore your tunnel wont recognize you, but when you switch back, it goes back to your old address and all is peachy.
 
personally i use vi/vim for text editing, so cant help you with your pico problem.

on another note, i should research how it is done one mac, probably easier than reinventing the wheel.

here is the site i posted earlier that described how to change default listening port on Leopard OSX (cygwin is just the sshd_config file):

http://rhodzy.co.uk/archives/305

i will check out vi/vim!

cheers
 
Im testing an app I found called iHound from app store (installous), it claims to track your stolen iPhone... If you are willing to pay for it, go ahead, if you are curious of other methods, pm me... I will let you guys know how it works out!

Never-mind, a user account is required and free only till the point of tracking the phone... does not work unless you pay... bastards
 
So lets assume you think you did enter the correct command, the error you show states your SSH server is not running properly... DO THIS:

go into your computer's terminal, type:

ssh -p 22 User\ Name@localhost

Example: ssh -p 22 Michael\ Withe@localhost

PAY CLOSE ATTENTION TO THE \, it needs to be there LIKE THAT for spaces to work within a User Name.

Tell me what happens after you hit enter, this is a command that will check to see if you are running the server localy at all... if you are, you should be prompted for password, if you get rejected, your SSH server may not be properly set up


In mobileterminal i typed:
ssh -p 22 Owner@(my external IP) -f -N -R 1201:localhost:5900

Told me connection refused.

Then went to Command Prompt in Accessories on my comp and typed in the command u told me to type in.
It looked like this:
C:\Documents and Setting\Owner>shh -p 22 Owner@localhost

Hit Enter and got this:
' ssh' is not recognized as an internal or external command, operable program or batch file.

And then i went n looked at setting up SSH in google and it led me to Cygwin...which i saw in earlier posts so i downloaded it..(took really long time)

And now i have no clue what to do...


I know..I'm really bad at this...I'm sorry that I have no clue what I'm doing...but I REALLY want to be able to do this...and have been searching for MONTHS on how to do this...without finding anything...and now I found someone whos managed to make it work....so thank you for all your time and ur patience.....
 
In mobileterminal i typed:
ssh -p 22 Owner@(my external IP) -f -N -R 1201:localhost:5900

Told me connection refused.

Then went to Command Prompt in Accessories on my comp and typed in the command u told me to type in.
It looked like this:
C:\Documents and Setting\Owner>shh -p 22 Owner@localhost

Hit Enter and got this:
' ssh' is not recognized as an internal or external command, operable program or batch file.

And then i went n looked at setting up SSH in google and it led me to Cygwin...which i saw in earlier posts so i downloaded it..(took really long time)

And now i have no clue what to do...


I know..I'm really bad at this...I'm sorry that I have no clue what I'm doing...but I REALLY want to be able to do this...and have been searching for MONTHS on how to do this...without finding anything...and now I found someone whos managed to make it work....so thank you for all your time and ur patience.....

you should allow PM's, your problem is spacific, seeing as I have tested it via cygwin (not with iPhone though)... Before I can help you any further, I need you to make sure you can connect to your SSH server locally...

That command you showed:

C:\Documents and Setting\Owner>shh -p 22 Owner@localhost

Should look like C:\cygwin\SOMETHINGHome>ssh -p 22 owner@localhost

When you install Cygwin, make sure to follow their instructions, you must install it with its own directory, and make sure you have installed the correct SSH packets required to run an ssh server within cygwin... here is a good link for step-by-step Cygwin installation:

http://pigtail.net/LRP/printsrv/cygwin-sshd.html

OR (older version)

http://erikjheels.com/?p=470

WHEN you have problems or differences WITH THE ABOVE INSTALLATION RULES, read these posts:

http://www.nabble.com/Wrong-Permission-on-the--var-directory-td18713386.html

http://davedotnet.blogspot.com/2006/06/installing-loopback-adaptor-in-windows.html

http://www.inkompetent.de/knowledge_base/software/vnc_loop_back.html

Once you have completed that, contact me via email michael_withe21@hotmail.com

Once the server is set up properly, this is a really easy process. Windows for the past million years has yet to implement SSH (yet they still use unencrypted telnet) into their command line/Operating system... those proprietary bastards want us to use slow VPN
 
For those setting up an SSH server on Windows Operating Systems:

When you install Cygwin, make sure to follow their instructions, you must install it with its own directory, and make sure you have installed the correct SSH packets required to run an ssh server within cygwin... here is a good link for step-by-step Cygwin installation:

http://pigtail.net/LRP/printsrv/cygwin-sshd.html

OR (older version)

http://erikjheels.com/?p=470

WHEN you have problems or differences WITH THE ABOVE INSTALLATION RULES, read these posts:

http://www.nabble.com/Wrong-Permission-on-the--var-directory-td18713386.html

http://davedotnet.blogspot.com/2006/06/installing-loopback-adaptor-in-windows.html

http://www.inkompetent.de/knowledge_base/software/vnc_loop_back.html

If you have completed that, and you are having troubles, contact me via email michael_withe21@hotmail.com



NOTE: check out http://www.orbicule.com/undercover/iphone/ , think its using the same technology, minus Our server plus Their own
 
yeah... except you cant just install stuff on os x with out your password, and since he isnt logged into terminal as sh then there is no real worry..

Installing things is the least of your worries.
I would really not like them snooping around in my personal documents, e-mail and browsing history. These are all stored in your profile ever heard of cookie stealing? Becomes pretty easy then. Besides that, I could create à symlink to my uploaded malicious file which replaces a word document and let the malicious file start the word document.

@Michael: do not pretend I am some kind of n00b, i am working as ethical hacker and have seen many uses of ssh fail because of unthouhtfullness.
Besides that, I did test it. In your command to connect the iPhone through ssh, You fail to daemonize it with the & sign, so it stays running within the terminal. Even if you did daemonize it, you could lookup the PID with ps -aux | grep ssh, and connect to the process for example with strace. I think there would even be a way of reattaching to the process, although I have no time now to look that up on the net.
 
In your command to connect the iPhone through ssh, You fail to daemonize it with the & sign, so it stays running within the terminal. Even if you did daemonize it, you could lookup the PID with ps -aux | grep ssh, and connect to the process for example with strace. I think there would even be a way of reattaching to the process, although I have no time now to look that up on the net.

Before i continue... i want you to understand, the thief has NO ACCESS to your home server... the ports are tunneled, and the "login" is closed, as long as you use my background commands... you can even close the terminal, the thief has no way of knowing its connected (unless this becomes more popular)...

BUT lets say HE DOES KNOW, what could he do? what would I do? I being the thief would go into the mobileterminal (because if you have changed your root/mobile passwords, he would not be able to "ssh" into the phone via wifi) and type netstat...

netstat DOES give this information...

[Established] state tp4 iPhoneIPaddress - MyHomeIPaddress.Port (stays established even if localhost is not in use)

AND A BUNCH OF OTHER CONNECTIONS WITH SAME FORMAT

so, because i have my ssh server on non-default port, all he would know is that the phone is connected to (Blank) IP address on a (Blank) port..

Now, dont get on a rant about what someone could do with your IP address, because thats just one of many connections and IP's listed... and when on a non-default port he has no idea what protocol is being used or if that IP is really owners... of course he could continue to port scan/who.is the ip, but still, i dont see this is a vulnerability... when my iphone gets lost/stolen, I wont let more than 5 minutes pass before im logged onto it looking at what there doing or tracking their position... and of course, i could close the connection at any time / change passphraze/dsa/rsa's and he never has access again. He would have to do all damage within a half an hour TOPS assuming he gets in without knowing any passwords or keys...

Again, he would have to know a heck of alot about terminal commands just to get AN IP ADDRESS (still not knowing what it belongs to), lol, and i dont think any linux/mac geeks are going to be STEALING iphones from people like me...

On the note of terminal:

My new commands include the "background" version, which will sign out of the computer's ssh and even attach to something that isnt the "terminal"...

How i tested this... ran reverse background command from iphone:

ssh User@name -f -N -R 1201:localhost:5900

once i enter my private dsa key passphrase (which you can require on your phone via the sshd_config file) the terminal goes back to iphone root... i can then further more "exit" every terminal (4 built in) and then [EXIT] the app completely by giving command [EXIT] (not just "exit")..

POINT: With the terminal completely killed/restarted, the connection remained and i was able to connect via my computers localhost...

i dont know what -f -N does that allows it to work outside of the mobileterminal app...

But if i restart my iphone or turn it off, the tunnel is broken... so it would have to be given at each bootup and each change of IP (source).

I appreciate your criticism, but i am a firm believer that some app heads could make this applicable... i know very little about how the OS runs, and even more little about how to write script... so my job here is to get the connection bugz out and do some tests and hand them over to someone els with right know-how.

NOTE: the ONLY time i use an & sign is when using an empty rsa/dsa key and am implicating the command to a script (do shell script)... but maybe im missing your point...

Here is the thread I started when i realized reverse ssh tunnels could bypass firewalls on the host side:


http://www.macshadows.com/forums/index.php?showtopic=9775


PS: i fiddle with port scanners and using routers against people (people without routers are just retarded)... but i wouldnt call that "hacking", more "snooping".. btw, you joined in jul 2009, your macrumors status is still "newbie"... not implying anything =P

Q: how do i add a command/script to iphone startup?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.