Ubuntu – ssh (into a mobile device) via USB

embedded systemsshtabletusb

I have a tablet with a USB connection to a host computer. (Ideally the host is running Windows, but if absolutely necessary I could switch the host to be Ubuntu also.)

I want to be able to SSH into the device without RS-232, WiFi, or other network connection. What software combination and setup do I need to make this happen?

Basically, I'd love the be able to have the equivalent of adb shell, but for when the tablet is running pure Ubuntu, not Android.

The tablet happens to be running 9.04, but I'd be happy to upgrade it if required.

Best Answer

So, to clarify, you want to connect to your tablet(running Ubuntu) from your PC (running Windows, but could run Ubuntu if it had to) by ssh over a USB connection?

I haven't heard of doing this before but google searches for things like "ssh over USB" let to many hits where people were showing how to connect a jailbroker iphone with OpenSSH installed to a Windows PC using WinSCP or Putty. Here are some links:

iFans - SSH via USB with WinSCP

OpenSSH, USB instead of WiFi

The Ubuntu tablet could easily replace the iphone because it has OpenSSH on it already but I don't know too much about tunneling a SSH connection to USB, except that SSH uses port 22. These two tutorials use a program called itunnel but I don't know anything about it. I went to itunnel's site and it said "iTunnel is a simple Linux command line program which provides SSH tunnelling over the USB cable to a jailbroken iPhone. I wrote this little tool because I got tired of having to SSH into my iPhone over the WiFi link. SSH proxy, ssh link, and scp all work great." Because it says "simple Linux command line program", I think it is at least worth investigating to see if it will work.

This is an interesting prospect and I would like to see where it goes, but I feel connecting through USB makes this considerably more work than it needs to be. I have used the android app Proxoid to connect my phone to my laptop for tethered wireless connections using the ./adb forward tcp:8080 tcp:8080 command but the tunneled connection required me to set the proxy on my browser before I could get online. Tunneling your SSH connection to USB might make it hard for your applications to connect without some extensive messing around with options.

If you have an old router lying around (like a Linksys wireless B or G router) you could just connect the Tablet and PC together using that and SSH into the Tablet without messing around with tunneling.

Related Question