In My Prievurs Post, I showed you how you can install Termux on Windows, but those methods take up a lot of space on your computer or aren’t exactly termux. So in this post, I will show you how you can use SSH Server in Termux to use termux in your windows terminal. We won’t install the actual termux on Windows, but use it with remote access.
What is SSH Server in Termux?
SSH stands for secure shell and is a cryptographic organization convention. With the help of ssh, two computers can access information without a third individual blocking in the middle. It is more secure than various conventions because it is coded. You can boot devices and use them with Windows without much of a stretch. If you have Windows, you should try it.
Termux is CLI-based, so when you access termux on Windows, it will feel like it’s installed on your computer. It never lags, disconnects, and never works properly. You can easily install tools when using Windows If you have Windows, you should try this.
You can also get to it and set up your termux completely like a hacking machine, such as introducing the device and creating all the records you can use at any time. I just tried it on Windows 10 and it works fine, but maybe Windows 7 and 8 don’t have ssh preinstalled in case this technique doesn’t work for you
How SSH works :
There are many practical applications for SSH. A network administrator could continue their work while they are on vacation in another continent. One office network in one geographic location could work with an office network in another geographic location so that all satellite offices of an organization are unified in their network. A contracted IT service company could provide remote technical support to a client’s computer on demand without having to physically travel. Or, considering how woefully insecure FTP is, the company could decide to use SSH for file transfers.
The SSH protocol is based on a client-server model. Therefore, the SSH client must initiate an SSH session with the SSH server.
The steps involved in creating an SSH session look like this:
- The client contacts the server to initiate a connection.
- The server responds by sending the public cryptographic key to the client.
- The server negotiates the parameters and opens a secure channel to the client.
- The user logs in to the server through his client.
It may seem a little strange, but having remote access to the PC command line from your phone is very convenient, especially when paired with an excellent Android terminal emulator like Termux.
Termux makes this process very easy. Emulates parts of Windows /Linux, including the /home directory. Termux actually has a package manager in the form of Apt and can install some basic packages.
- Also Read: PUBG & BGMI Mobile Account Hack Phishing tool with Termux
- Also Read: Installing GHOST Framework in Termux | No Root
- Also Read: Termux 403 Forbidden Error & Under Maintenance Error Fixed
Termux Connect Windows CMD SSH Server :
These are Android commands that run on Termux and set up an SSH client and server, allowing connections from your computer to your Android and vice versa. It does not include the SSH server and client set up on your desktop computer.
Most importantly, we will introduce OpenSSH and Nmap in termux using the basic pkg order. Nmap will show us open ssh ports in termux. The size of open-ssh in termux is practically 2.26 MB, so it will be introduced in seconds. In addition, Nmap is a small 4.8Mb package. Simply put the order below and open-SSH and Nmap will be introduced in termux.
Currently, start the ssh worker by creating the order below. This order will start the ssh worker in your termux application.
Currently, the worker is running and you need to set the client password in termux, place the order under termux and duplicate your username.
make sure you copy the full name as shown in the image above.
After duplicating the username, we need to set a secret key for it by creating an order below the order, just paste your username in the green part of the order and hit enter.
after pressing enter it will ask you for the passkey, you have to enter whatever passphrase you need but make sure you don’t forget it (just enter 1234). after you type your password and press enter, you will be asked to re-enter the password. Just sort a similar secret word once more. Plus, it won’t show you what you’re composing even though it’s there, so it’s just imperceptible, but the passphrase is there.
You currently need to find out your closest IP address, make sure your computer and your phone are on a similar Wifi organization, otherwise, it won’t work. Enter the order below to find out your IP address.
You will be tracking your own IP address in a similar area I discovered in the image above.
There is one more thing we need the ssh port which you simply have to enter under the order and you will see your ssh port number (mostly it will be 8022).
In the image above you can see that my ssh port is at 8022. In case you don’t see any port, type sshd and then run Nmap localhost again.
This step is a basic step. Now open the order sheet on your PC by pressing CTRL+R and then type cmd and press enter. Now here you need to enter the command to link your termux to your command.
example: ssh email@example.com -p 8022
In the above order, you need to enter your username in the green part, your IP address in the pink part, and the port number in the red part. Enter the correct order and press Enter.
Since Termux is a single-user system, you can connect as any user – regardless of the username you enter, you will log in as the only available Termux user.
The Termux sshd binary does not support password login, so the key must be authorized in
~/.ssh/authorized_keys before connecting. If needed, use ssh-keygen to generate a new one.
After you type the correct order and press enter you will see the text on the last line “are you sure you want to continue matching” Just sort Yes and press enter. What’s more, now you need to enter the passphrase that you used during setup, enter that passphrase, and hit enter and you’ll be inside the Termux terminal.
This is your unique termux accessed via ssh in your windows and anything your boot and make will also be made in your termux but you don’t need to turn on your termux just run your phone working lock and use it in your pc.
How to Close the SSH server in Termux? :
To close the ssh service you can generally close or exit your termux and the ssh worker will then be killed, but in case you don’t want to close your termux you can kill the ssh interaction using the command below.
How to Restart the SSH server in Termux :
Everything is set and if you want to use it a second time then you don’t have to follow the steps from the beginning just enter sshd and use the command in step 7 and enter it in windows and if your IP is the same then it will connect but if your IP changes you have to follow from step 5. Also, Windows 7 and 8 don’t have ssh preinstalled, if this method doesn’t work for you, then I wrote this post for you.
Termux SSH is the best method to access termux on your windows computer. It looks complicated but it is really simple to install and after one-time installation, it is so easy to use every day. Tried to make this tutorial simple but if you still face problems while using this method then comment below and I will make a Lazy Script for it. Keep in mind that when you reinstall your termux, you have to set it up again. If you want to install real termux on your computer. I barely used Nmap in this post, but you can learn all about Nmap. Thanks for reading Guys Have fun, and happy hacking.