termux-sshd
You can run OpenSSH Server in Termux to make it remotely controllable.
To install it:
| Bash | |
|---|---|
If you want to set up password authentication:
| Bash | |
|---|---|
Note: the password will be stored (hashed) into
~/.termux_authinfo. Thepasswdcommand will NOT ask you for the old one, so you can always reset it in case you forget it.
If you want to set up public key authentication:
| Bash | |
|---|---|
To be able to connect, you also need to know what is your username in Termux, and the IP address of your device:
Now you can start the SSH server:
| Bash | |
|---|---|
You can now connect to it by running the following from another host (the default port of the SSH server in Termux is 8022):
| Bash | |
|---|---|