All     Ethical Hacking     Networking     Programming     OSINT

SSH Tools in Termux – Installation & Basic Commands

SSH (Secure Shell) allows you to securely connect to remote servers, manage files, and run commands over a network. Termux includes OpenSSH, which gives you both an SSH client and server. This lets you connect to other machines or allow others to connect to your Termux device. Below are the installation steps and basic commands.

Installation

Update Termux packages:

pkg update && pkg upgrade -y

Install OpenSSH:

pkg install openssh -y

Check SSH version:

ssh -V

Start SSH server in Termux:

sshd

Find your IP address:

ifconfig

Set a password for Termux login:

passwd

Basic Commands

Connect to a remote server:

ssh username@server-ip

Connect with a custom port:

ssh -p 2222 username@server-ip

Copy files to a remote server using SCP:

scp file.txt username@server-ip:/path/

Copy files from a remote server:

scp username@server-ip:/path/file.txt .

Generate an SSH key:

ssh-keygen

Start SSH server manually:

sshd

Stop SSH server:

pkill sshd

Check SSH server port (default 8022 in Termux):

sshd -p 8022

Uninstall SSH:

pkg uninstall openssh