If you don't have a this package openssh
should install it.
Inside Termux run this:
pkg install openssh
Reset password:
passwd
Start SSH service:
sshd
Using any device on same network with SSH client connect to Termux:
ssh <any_name>@Termux_Device_ip -p 8022
If we want turn off sshd, we should write this:
pkill sshd
Also you can connect to another device using Termux on mobile.
Inside Termux run this:
ssh <any_name>@device_ip
or using port:
ssh <any_name>@device_ip -p 8022
But when using this, make sure that the device you will connect to is both on the same network and whether the ports are blocked with UFW.