Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
08-14-2011, 12:20 AM #1Fast SSH/VNC using USB and itunnel-mux
Fast SSH/VNC using USB and itunnel_mux
Do you use SSH to look around, make minor file changes or back-up important files? Is VNC too slow over WiFi or is your WiFi broken? Have you tried programs like iPhonebrowser, or ?? and were disappointed? Do you want fast access while maintaining the low-level root capabilities of an true SSH client?
If this describes you, allow me to introduce itunnel_mux
What is itunnel_mux? In simple terms, it's a light-weight USB router (network <=> USB connect iDevice).
For those unfamilar with ssh, a common ssh session connects two computers over a network. For a typical iDevice user, it's your computer to your iDevice using WiFi. Example: ssh [root][mobile]@iDevice_IP
Using SSH via WiFi is simple, easy, and quick. Unfortunately, WiFi can be ......s..l..o..w........
A 700MB takes 12 minutes over WiFi, 3 1/2 minutes using itunnel_mux.
Want a faster ssh? Use itunnel_mux and get USB speeds using familar ssh programs and utilities.
A. Set-up procedure (iDevice):
1. Install OpenSSH and OpenSSL (via Cydia)
B. Set-up procedure for SSH (computer):
1. Download and unzip itunnel_mux_rev71.zip (PC) or itnl_rev71.zip (OSX) from ( Downloads - iphonetunnel-usbmuxconnectbyport - USB mux TCP tunneling and basic iRecovery functionality without libUSB - Google Project Hosting ) to a new directory.
2. Connect the iDevice to the computer via USB
3. Open a cmd window and change to the same new directory as in step 1.
4. Type: ./itunnel_mux --lport 9990 --iport 22 (this window must remain open or minimized )
.... or ... .\itunnel_mux --lport 9990 --iport 22 ("./" or ".\" depends upon your computer's ssh client)
C. Connecting to your iDevice for SSH:
1) Open a new cmd windows and type: ssh root@localhost -p 9990
If asked accept/update the new RSA certificate.
Enter your password (default: alpine; now's a good time to change it!)
.... or ...
WinSCP (Host: 127.0.0.1, Port: 9990, User: root, Password: alpine, SFTP + Allow SCP fallback)
.... or ...
Your favorite ssh client program using IP 127.0.0.1 and port 9990
E. When finished, terminate ssh clients, and Ctrl-C from the itunnel_mux cmd window.
Note1: Connections use standard ssh. Multiple intermixed (USB/WiFi) clients are supported.
Note2: Any unused TCP port can be used. (ex: 9990)
Note3: itunnel_mux is available for both Windows and OSX and works on all iDevices/iOS's with OpenSSH/OpenSSL installed
Note4: iTunes can be open or closed
Note5: afc2add is not required
Note6: Compared to WiFi .... itunnel_mux is 4+ times faster.
Note7: Cygin ( Cygwin ) and WinSCP ( WinSCP :: Free SFTP and FTP client for Windows ) are good (and free) Windows ssh file system clients.
Note8: Technically, itunnel_mux provides CLI over USB (thanks moon#pie and Orby)
Note9: All credit goes to the developer (msft_guy). I'm just an admirer of great tools and utilities.
Note10: Accessing the iPhone via USB with a network IP provides many exciting possibilities
Note11: itunnel_mux can be used on different TCP ports ( ie: VNC: itunnel_mux --lport 5900 --iport 5900)
VNC links: Veency (via Cydia) and VNC viewer free edition ( RealVNC - VNC® download selector )
Be careful !!! Know what you're doing and why !!! Mistakes can be catastrophic !!!
Other USB tunnel packages exist on the web. While they may work (I didn't try all), they are not light-weight solutions. My preference is a simple solution to a simple problem from a well-known user & developer.
Last edited by Mes; 08-21-2011 at 01:22 PM.
08-21-2011, 01:28 AM #2
08-21-2011, 09:35 AM #3
In the command prompt window, "is not a recognized internal or external command" is the same as "Command Not Found". Put itunnel_mux.exe and libMobiledevice.dll in the same directory. From the command prompt window, change to that directory and try again.
08-21-2011, 09:41 AM #4
I did that
08-21-2011, 09:44 AM #5
Depending up the ssh client, the path might be different:
... if ./itunnel_mux doesn't work, try .\itunnel_mux ( notice "./" is changed to ".\" )
08-21-2011, 12:36 PM #6
Ok well I tried the other way ".\itunnel_mux --iport 9990" and it worked. Now a opened another cmd and typed "ssh root@localhost -p 9990", which didn't work so I went back through everything and changed the port to 5900, which still didn't work. Now I tried using port 9990 in the first part, ex: ".\itunnel_mux --iport 9990", and then on the second part I used the port 22, ex: "ssh root@localhost -p 22", and this time it did something on the first cmd window, but it was an error. So I kept on trying different things like replacing port 9990 with port 5900, but the same thing happened. So I rebooted my phone and computer, and retried everything, still nothing. So I went into my phone and turned on veency (vnc for iPhone), and then I retried everything and finally, using port 9990 for the first cmd window and using port 22 in the second window. This time it worked. So I went into winscp and entered the info, 127.0.0.1, port: 22 (also tried 9990) username: root, pass: alpine, SFTP, checked that box, and I pressed login, and pressed accept on my phone and it acted like it was gonna connect but it didn't... So I'm stuck
08-21-2011, 12:53 PM #7
^That was a lot of info .. and a bit hard to follow.
Let me try to clarify what is going on.
itunnel_mux is a simple USB to network router.
itunnel_mus routes data between computer and USB (iPhone) --lport xx and --iport xx The default --iport is 22 (ssh)
itunnel_mux creates a new connection point (ie: --lport xx) on your computer: ie 9990 or 5900 or anything you want.
This new TCP port must be unused and allowed thru your firewall.
It's best to use a high number because low numbers are often used by other programs.
From the same computer itunnel_mux is running, ssh or VNC or WinSCP or whatever network app you want
.... connects to your computer via IP 127.0.0.1 (or localhost) and the TCP port created by itunnel_mux
On the iPhone, no configuration changes are needed. ssh / veency use their default ports.
It's that simple. If something doesn't work, check your firewall and tcp port or phone.
Let me add this:the default iport (port on the iphone) is 22 ... so it works for ssh by default
veency's default port (on the iPhone) is 5900. itunnel_mux --iport must be used and set to 5900
Does this help? If not ... maybe I'll rewrite the whole thing ... and use examples for each connection port and app
Last edited by Mes; 08-21-2011 at 01:15 PM.
08-21-2011, 01:40 PM #8
Well I tried just using ".\itunnel_mux --iport 22" and "ssh root@localhost -p 22" which works for ssh just fine (probaly cause it's the default one like you said), but vnc still won't work... To me ifunbox works just fine but you claimed yours to be 4 times faster which is why I was interested.
08-21-2011, 01:44 PM #9
Use this command for veency itunnel_mux --lport 9990 --iport 5900
BTW: 4 times faster than WiFi. ifunbox does the same thing. itunnel_mux is a light-weight solution.
If you have ifunbox running, or other network apps/services/etc running at the same time, that will cause problems.
08-21-2011, 01:47 PM #10
i closed everything before i tried using this, i was just looking for a faster vnc connection, but vnc is just slow as is xD lol, oh well, nice tutorial btw.
08-21-2011, 01:50 PM #11
I use itunnel_mux frequently, especially when transfering large files on a Windows 7 system.
What OS are you using? There is absolutely no reason it can not work for you too
08-21-2011, 01:56 PM #12
win 7 too, ssh will work with your way only while using the port 22, but vnc wont work that way, but ifunbox picks up the slack and is good enough. i had gotten vnc to work through itunnel along time ago, but it was too slow either way, wifi or usb connection. and recently i was trying to find an app or program that would let me use a mouse (mainly a wireless mouse and keyboard) to control my iphone, like i am right now. but i came across your post and it sounded like it would be faster but i guess not, oh well lol
08-21-2011, 02:00 PM #13
There is no doubt, something is interfering with your connection because the process is the same. Being a larger program, likely ifunbox is taking care of the interference automatically.
At least that works for you
08-21-2011, 02:09 PM #14
Good stuff, will have to give this a go.
08-21-2011, 02:10 PM #15
Thanks. Good afternoon Bo Feeling any better?
08-21-2011, 02:14 PM #16
Not to bad today, thank you.
08-21-2011, 02:15 PM #17
That's good to hear. We're holding down the fort and praying for you !!
08-21-2011, 02:18 PM #18
^thank you my friend, and your all doing such a great job too.
08-21-2011, 02:20 PM #19
Thanks. We're trying to live up to your reputation
08-21-2011, 04:08 PM #20
@mes, Ty for the post though, I did learn a thing or two about ssh and cmd prompt stuff