OpenSSH in Termux – Installation & Usage Commands

OpenSSH is a simple tool that lets you connect one device to another using the internet in a secure way. With OpenSSH, you can control a server, access files, and run commands from your Android phone just like using a computer. It is widely used by developers and system administrators for remote access.

Installation Commands

Update Termux and install OpenSSH:

pkg update && pkg upgrade && pkg install openssh -y

Check installation:

ssh -V

Usage Commands

Connect to a remote server:

ssh username@hostname

Connect using IP address:

ssh username@192.168.1.1

Connect using custom port:

ssh -p 22 username@hostname

Generate SSH key:

ssh-keygen

Copy SSH key to server:

ssh-copy-id username@hostname

Start SSH server in Termux:

sshd

Check current IP address:

ip a

Connect to your Termux from another device:

ssh user@your_ip -p 8022

Stop SSH server:

pkill sshd

READ ALSO  Termux Command Cheat Sheet

Leave a Comment