In My Prievurs Post, I showed You, How you can Install Termux in Windows but those methods take a lot of space in your computer or they are not exactly termux. So in this post, I am gonna show you how you can Use SSH Server In Termux to use termux in your Windows Terminal. We will not install the actual termux in windows but we will use it with Remote Access.
What is SSH Server in Termux?
SSH stands for secure shell and it a cryptographic network protocol. With The help of ssh two computers can access data without any third person intercepting in between. It is more secure than other protocols because it is encrypted. You can use ssh in Termux to make a Private tunnel for you so that you can access your Termux in Windows easily.
Termux is CLI-based so while accessing the termux in Windows you will feel like its installed in your computer. It never lags, It does not disconnect, and it never malfunctions, You can easily install tools while using it with windows If you have a Windows then You should try this.
You can also access it and set up your termux fully like a hacking machine, like installing tools and creating all the files that you can use any time you want. I have only tested it on Windows 10 and it works perfectly but maybe Windows 7 & 8 do not have ssh preinstalled if this method does not work for you then I have Written this Post for you Guys : [ Termux Tmate : Access Termux Remotely In Any Browser ]
Use Termux in Windows using SSH Server:
Please read this article carefully because this one is not just copied and paste, if you miss any part then it won't work.
pkg install openssh nmap -y
Step 2:
Now Run the ssh server by typing the below command. This command will start ssh server in your termux app.
sshd
Step 3:
Now the server is running and you have to set up a password for user in termux type the below command in termux and copy your username.
whoami
make sure you copy the full name as given in the above picture.
Step 4:
After copying the username we have to set up a password for it by typing the below command, Just paste your username in the green part of the command and Press enter.
passwd u0_a298
after pressing enter, it will ask you to enter a password, you have to type any password you want but make sure you won't forget it (just type 1234). after you type your password and press enter, it will ask you to retype your password, Just type the same password again. Also, it will not show you what you are typing but it's there so it's just invisible but the password is there.
Step 5:
Now you have to find your local IP Address, Make sure your computer and your phone is on the same Wifi network or it won't work. Type the below command to find out your IP-Address.
ifconfig wlan0
You will find your own IP address at the same location I have shown in the above picture.
Step 6:
There is one more thing that we need is the ssh port, that you just have to type the below command and you will see your ssh port number ( mostly it will be 8022).
nmap localhost
In the above picture, you can see that my ssh port is on 8022. If you don't see any port then you should type sshd and then again run nmap localhost.
Step 7:
This is Step is the main Step, Now open the command prompt on your computer by pressing CTRL+ R and then type cmd and press enter. Now here you have to type the command to connect your termux with your Command prompt.
ssh username@your-Ip-asdress -p portnumber
example: ssh u0_a298@192.168.1.201 -p 8022
In the above command, you have to enter your username in the green part, You have enter your IP address at the pink part and the port number at the red part. Type the correct command and press Enter.
Step 8:
After you type the correct command and press enter you will see an in the last line it says that "are you sure you wanna continue connecting" Just type Yes press Enter. and Now you have to type your password that you used while setup, type that password and Press Enter and you will be inside your Termux Terminal.
How to Close the SSH server in Termux?
pkill ssh