Access termux from your laptop using USB

themountain
Aug 31, 2018 · 1 min read

I am an avid user of Termux. I like the app and all the things that it can do. Recently I started accessing it by SSH server via router. But what if i don’t have a wireless connection. So, after two days of rigorous net surfing i came to know about this to access termux via ADB.

First of all the things that you will need:

  1. Make sure you have Termux Installed!! (Duh!!)
  2. Download ADB from here for your laptop.
  3. Install open-ssh server on your termux. (You can follow this story for more details.)
  4. Setup all the things described in that post.
  5. Start USB Debugging on your phone by going to developer’s settings.
  6. Open a command window in your laptop and go to the directory where adb is installed.
  7. Run adb devices and accept the confirmation from phone’s screen when you see it. Now you will see your device listed on your laptop when you run adb devices.
  8. Run adb forward tcp:8022 tcp:8022

This command will forward your personal laptop’s port number 8022 to your phone’s 8022 port.

9. Open Putty or any SSH 2 Protocol client where you have stored your private key and open localhost:8022 and voila!! it will open your termux.

Let me know what you think about the post in the comments. If you face any issues while following this do let me know.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade