Termux Install SSH Server

Kevin FOO
Dec 6, 2023

Termux in Google play store is outdated and to get the latest version of Termux you will need to get it from F-Droid. Once you successfully install Termux, update it.

pkg update

Upgrade it if it is outdated.

pkg upgrade

To install SSH server, run

pkg install openssh

Set a password to your current user by running

passwd

To find out your user ID, run

whoami

My phone is currently connected to the wifi, to find out the IP address run

ifconfig|grep inet

To start it, run

sshd

SSH server will run at its default port of 8022. To customize the SSH server, the sshd_config is located at

/data/data/com.termux/files/usr/etc/ssh/sshd_config

Now that you know all the information required to connect it through SSH. To connect to it run

ssh -p 8022 u0_a306@192.168.1.251

< Back to all the stories I had written

--

--

Kevin FOO

A software engineer, a rock climbing, inline skating enthusiast, a husband, a father.