Tethering Android with Linux via ssh server and port forwarding

I'd been using this script to tether Android to Linux via Azilink, but that has stopped working for some reason, so I found another solution, boiled down and re-documented here for posterity:

  • Install Connectbot on your phone, connect (via ssh) to your server, and login
  • In Connectbot (while connected), configure port forwarding with these settings: (Nickname-of-your-choosing, local, 10022, localhost:22)
  • Connect your phone to your laptop via usb cable
  • On the laptop, in terminal:
    • sudo adb forward tcp:10022 tcp:10022
    • ssh -D 9090 localhost -p 10022
    • Configure SOCKS proxy settings on the laptop to use port 9090

Done!

The content of this field is kept private and will not be shown publicly.

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Comments

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.