Skip to content

Instantly share code, notes, and snippets.

@Fartomy
Last active February 19, 2023 22:06
Show Gist options
  • Save Fartomy/c491fe6671b04a61a28818f6b71a0cac to your computer and use it in GitHub Desktop.
Save Fartomy/c491fe6671b04a61a28818f6b71a0cac to your computer and use it in GitHub Desktop.
Remote SSH into Termux from any other device on same network

🔌 Steps to Connect to Termux

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

Connecting to another device using Termux

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment