Skip to main content

TERMUX -- Setting up SSH Server

 Setting up SSH Server

SSH Server

Q. what is SSH ?😕

  •  SSH stands for Secure shell
  •  SSH provide remote access and provide communication between 2 devices.
  • SSH is very useful connection for the remote access point of view.
  • You can share file,folders, copy , paste,cut , remove and many more thing...

Let's being with the practical on termux:


Fig. Termux app on Android 


Step 1: Update and Upgrade the package.

Note: It is better whenever you're installing anything on termux or any other shell please update and upgrade the package for better performance and no error's 😉


apt update

update termux

apt upgrade

or

apt upgrade -y

Upgrade termux


Step 2: Install ssh Package

pkg install openssh nmap -y

Fig 2.1 Installing package openssh via nmap


Step 3: Basic cmd to check userid and ipaddress

  1. whoami
                   It provides the userid or username on the device it is just a random id/name.

   2.  ifconfig
              
            It provides the ipaddress of your device.

Note : It is confidential don't share and while using termux make share you have switch on your  "hotspot" on particular device. otherwise it will show ipaddress of localhost.

Step 4: Check localhost for ssh 

nmap localhost

Fig 4.1 nmap localhost


Note: If it prompt error then make sure the package nmap is install. If not then install by using cmd  "pkg install nmap -y"

Step 5: Few cmd will repeat

  1. sshd
  2. nmap localhost
    Fig 5.1 nmap localhost (port 8022/tcp)

  3. whoami: userid will be seen copy or notedown.
  4. passwd <userid> : It will ask to setup a passwd
  5. sshd
  6. nmaplocalhost

Now, comes the interesting part. On another device use termux open termux app and via some cmd you can access above userid on this device.

Step 6: Install ssh package 

Make sure to update and upgrade here as well.

apt install openssh -y

Step 7: Now username/userid

ipaddress of your device which you have check previsouly in step 3 (sub-step 2)

ssh <username@ipaddr> -p 8022


Comments

Popular posts from this blog

Intro to Containerisation

  Fig 1. Docker Engine and Application