Thursday, August 12, 2010

iPhone and iPod CLI text editor

While gTxtEdit is a pretty nice GUI text editor for jailbreakers, I really don't like that you have to retype the entire file path when saving. Plus, I need something I can use from the command line for doing minor edits to config files without having to leave the shell.

I was very happy then to find that both vi and nano are available for download through Cydia. FYI, when you call vi from the command line, you will need to use vim, not vi.

I also tried installing mg, which is based on emacs, and though it seemed okay for new files, I got bus errors when opening existing files. Google showed others experiencing this as well. Never mind though, 'cause having vi and nano on my iPod is out of this free world!

Tuesday, August 10, 2010

VNC to your iPhone/iPod

Don't you get tired of having to let go of your mouse and pick up your iPod? Me too, so I've decided to save time and dolphins by just VNCing to my iPod when I can. Every little bit helps:

1. Install Veency on the iDevice
2. Install a VNC client on your PC.
3. Enjoy pointless amazingness.


Change the SSh port on iPhone/iPod

Just changed my SSh port to an alternate one using the following (no, sshd_config won't do the trick!):

1.
echo "sshalt nnnn">>/private/etc/services
(editing the file directly seems to crash every time) -- The letter n in the command above, indicates a digit of the alternate port of your choice.

Edit: Btw, make sure you use BOTH of the carrots in the echo command! >> is good. > is well, you just hosed an important system file.

2.
Use the gTxtEdit app to edit /Library/LaunchDaemons/com.openssh.sshd.plist

3.
Look for SockServiceName and change it's string to sshalt:
SockServiceName
sshalt

4.
Save the file, reboot and enjoy!
 

Terminal Access on iPhone/iPod

Hello world! I haven't been able to find this online anywhere, so here it is for those who may find it useful...

jailbreakme.com apparently breaks Mobile Terminal. This means you will have to change the passwords from your PC using an SSh client like Putty, etc. (I tried installing an older version of Mobile Terminal via the deb file, but no worky.) Another way to get terminal access is to use a SSh client for iDevices like TouchTerm, iSSH, etc. and simply SSh to localhost! This works awesomely for port scanning after installing nmap!

Edit:
Oh, and there's also a very cheesy and very free iPhone SSh client called Mobile Admin also available from the Apple app store which you can use for this. Strangely enough, however, you must SSh to the loopback address of 127.0.0.1 because it can't resolve the hostname localhost.