OpenSSH

Encrypted remote shell and file transfer suite

About

OpenSSH provides an encrypted remote shell and the file transfer tools beside it. That covers secure copy, an interactive client and a key generator. In Termux your phone can also act as the server.

Install it

pkg install openssh

Run this inside Termux. If the package is already present, pkg will say so and do nothing.

Commands worth knowing

6 of the invocations you will actually reach for. Tap the copy button to put one on your clipboard.

ssh -p 2222 user@192.168.1.10 Connect to a host over a non-standard port. The usual case for a phone server on a high port.
ssh -i id_ed25519 user@example.com Authenticate with a specific private key instead of the default one.
ssh -L 8080:localhost:80 user@example.com Forward a local port through the connection. Reach a remote service from your device.
ssh -N -f -D 1080 user@example.com Start a background SOCKS proxy over the connection for routing other apps.
ssh -o StrictHostKeyChecking=accept-new user@example.com Connect to a host seen for the first time without the prompt. Useful inside scripts.
ssh -J jump@example.com user@internal Reach an internal host through a jump server in a single step.

Worked example

Run ssh user@example.com and this is what you should see.

termux
$ ssh user@example.com
Host key fingerprint is SHA256:AbCdEf1234567890.
Warning: permanently added example.com to the list of known hosts.
Welcome to Ubuntu 24.04 LTS
Last login: Fri Oct 23 09:12:44 2026 from 192.168.1.5

Developed by

The OpenSSH project .