Linux Blog

Tether iPhone through the cable, on Linux

Filed under: General Linux — TheLinuxBlog.com at 10:02 am on Thursday, August 20, 2009

So you got an iPhone huh? perhaps you’ve got an SSH client and maybe you jailbroke your iPhone and have done some iPhone wifi tethering (That’s not the best way, and not free), but have you been able to use SSH through the cable? Me neither until a little while ago.

The benefits of connecting by the cable are slightly obvious to anyone who wants to do it:

BATTERY!
With your phone plugged in, you’ll get better battery life, or perhaps just prevent the battery from getting discharged any further.

No Wifi Setup
This was really the biggest problem for me, having to reconfigure wifi on my laptop then getting the laptop and phone to talk. Some times wireless connections mysteriously dropped or just acted plain funky. Any one who’s ever typed in a WEP key on the iPhone also knows what a pain it is, so not having to use Wifi is a plus.

Privacy
Since the cable is used, there should be no wireless network for others to fool around with.

Data Transfer Rates
I have not yet confirmed this, mostly because I’m lazy, partly because I don’t have the time to produce any stats but, 480Mbps with USB2.0 Vs. a theoretical 54Mbps on 802.11G

Enough already, how do I do it?
Thanks to Jing Su there is a LGPL’d piece of software called itunnel that can be found here. Installing itunnel will vary by distribution. It’s fairly straight forward on Fedora, provided you have the library libiphone installed you should be able to download, untar, make, and run.

Once you’ve installed itunnel, you run it by using:

sudo itunnel <port>

If you don’t specify a port it listens on port 3023.

Connect to localhost using your normal SSH Socks proxy method -D <port> and your username, default being mobile with your new port.

 ssh -D <yourport> -p 3023 mobile@localhost

Type “Yes” to accept the fingerprint (you may need to eventually change your fingerprint when you upgrade your phone) and then type in your password which should NOT be “alpine”, because you did change it right?

Once you’re SSH’d in, you can set up your browser to use the socks proxy as you would with Wifi tether version on the port you specified with -D.

There you have it, a way to Tether your iPhone through the cable on Linux! Rumor, (well not really a rumor, since I’ve used itunnel.exe) has it that this also works with a Windows box, just try to find a non-virus infected version of the iTunnel suite.

Happy Hacking!

iPhone SSH Client – Update

Filed under: General Linux,Linux Software — TheLinuxBlog.com at 8:35 am on Friday, July 11, 2008

I decided not to go ahead and purchase an iPhone just yet. What that means is I will not have a need for a SSH client. Once I get an iPhone its my first thing to do. The client would probably be released for free, or with optional support / donation.

So,  if there are any companies or organizations that need an iPhone SSH client, consider sponsoring the development in the form of an iPhone. In return I will give the community a free SSH / SCP client and that the donor free lifetime support.

This post is an update to: http://www.thelinuxblog.com/iphone-ssh-client/

iPhone SSH Client

Filed under: General Linux — TheLinuxBlog.com at 2:34 pm on Monday, June 9, 2008

For those of you that have been following me for a while may remember my post titled Phones Meet Linux on iPhone alternatives and how I probably would not buy an iPhone. Today the iPhone has another alternative: its self. Apple announced the release of a new version of the iPhone. I’m sure your all familiar with this by now since its been rumoured for months but now its been announced.

So, with the announced release of the iPhone I’m happy to see that developers can now develop and distribute applications for the iPhone. Now I’m wondering how long it will be before there is a SSH client in the application database for the iPhone. System monitoring applications would also interest me. Among this they have also dropped the price, it will only be a matter of time before they run out.

What does this mean for open source developers? I cannot say I know the answer to this question yet. Is Apple going to allow open source projects to be distributed through their network? Wouldn’t it be nice? Free applications for the iPhone that are better than paid versions would be killer. What are your thoughts on this?

Secure VNC By Tunneling with SSH.

Filed under: General Linux,Quick Linux Tutorials — TheLinuxBlog.com at 10:09 pm on Saturday, October 13, 2007

Introduction
Remote administration is either a luxury of necessity when it comes to computing. I don’t know how many times I’ve heard people say they would like to be able to remotely access their files or us their computers. Luckily for Linux users this is an easy task.
VNC (Short for Virtual Network Computing) is used to open up a window of a remote desktop. It was created by Olivetti & Oracle Research Lab and acquired by AT&T, now there are many different flavors of VNC servers and clients available. I recommend the use of TightVNC and x11vnc.

Security
VNC is not a secure protocol by default, passwords and data are transmitted in clear text and can be sniffed by any malicious user. To resolve this problem I introduce SSH Tunneling. As we all know SSH is a secure remote shell and with this we can tunnel ports to create a secure connection.

Server Setup
The First step is to have a VNC server running on the box. I like to use x11vnc as it uses the current X session if its available. After x11vnc is installed make sure that X and x11vnc are running.

Client Setup
On the client a VNC Client is needed any client will do but I recommend using TightVNC or RealVNC.

Commence the tunneling
Once the server and client are set up a SSH connection will have to be set up with local to remote port forwarding. The syntax for this command is:

ssh [-R [bind_address:]port:host:hostport] [user@]hostname

To setup a connection from my laptop to The Linux Blog:

owen@linux-blog-lappy:~$ ssh -R 5999:192.168.1.x:5900 thelinuxblog.com

The “-R port:host:hostport” Portion of the command is the part that sets up the port forwarding. In my above example its telling the SSH client to forward localport 5999 to port 5900 on 192.168.1.x (my laptops IP). Once your SSH connection has been made the VNC Client on your local Linux box can be started.
Each client is different but with TightVNC from your run prompt or terminal you can just type:

vncviewer localhost::5999

This will open up the VNC client on your local machine, connect to your local port that you set up in the SSH connection and tunnel all information through the secure connection.

Conclusion
Voilla! There you have it, you can now use SSH and VNC in unity to achieve secure VNC communications. Neat!