Access Termux in windows

Complete guide to access termux in windows via ssh and scrcpy

Yash
3 min readOct 29, 2021

Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required.

Termux has installation support for many programming languages as C, C++, Python, e.t.c. So termux can be used as a development environment. But there arrives an issue when it comes to writing the code. Despite mobile devices being powerful, it feels hectic to type code using mobile. So to resolve this, you can SSH into termux or use scrcpy.

Photo by Pankaj Patel on Unsplash

Let’s see how !!

1. SSH

  • Launch termux app & run these commands
  • pkg upgrade
  • pkg install openssh -y
  • passwd (Typed text will not be visible)
Set password
  • ssh-keygen (Skip user inputs by pressing enter)
  • cd .ssh/
  • cp authorized_keys id_rsa.pub
  • termux-setup-storage
  • mv id_rsa id_rsa.ppk
  • cp id_rsa.ppk /sdcard/
  • Now we have copied id_rsa.ppk file into our internal storage (Open file manager and transfer id_rsa.ppk file into PC )
  • Type ifconfig (Snap below shows where to find ip)
Finding address
  • Now type sshd -d
sshd error
  • If error occurs like above just type — killall sshd and restart termux

Now we need putty to make access. (Download it from here according to the system architecture. 32-bit or 64-bit)

Launch putty — follow steps in snaphots below.

Step 1 — Enter IP and port
Step 2. Import id_rsa.ppk file
Step 3 - Skip “login as” by pressing enter , enter password set by passwd command
Step 4 - Got termux access
Optional Step 5— Right click on top and save the save session
Step 6 — Voila

2. Scrcpy

  • Connect mobile device via USB cable.
  • Open phone settings and see if there is an developer option setting.
  • If not got to About Phone and click on build number 6–7 times.
  • Enable usb-debugging option in developer option.
  • Open zip file downloaded — Double click on scrcpy-console windows batch file
  • Done, the phone is visible on screen.

--

--