SSH
Learn how to run an SSH server on your Android device with Andronix, either from Termux (recommended) or from inside your Linux distro.
SSH lets you access your device's shell remotely. This page covers two ways to run an SSH server: from Termux and from inside your Linux distro.
We recommend running the SSH server from Termux rather than from the Linux environment. An SSH server running in Termux gives you control of both your device and your Linux OS. Both methods are described below.
SSH via Termux
Follow this guide to learn how to run an SSH server from Termux. The tutorial is officially provided by one of the Termux developers.
SSH via Linux
Since Linux runs through PRoot, it cannot override Android's default connectivity configuration, so the SSH port number needs to be changed. Follow the steps below to run SSH from Linux:
sudo in front of each command below, skip the PermitRootLogin change and the root password step, and connect as your user, for example ssh alex@192.168.xx.xx -p 2222.Install OpenSSH
Install OpenSSH inside Linux. Pick the command for your distro from the list below:
Ubuntu
apt install openssh-server nano -yKali Linux
apt install openssh-server nano -yDebian
apt install openssh-server nano -yManjaro
pacman -S openssh nano --noconfirmArch
pacman -S openssh nano --noconfirmFedora
dnf install -y openssh-server nanoAlpine
apk add openssh-server nanoVoid
xbps-install openssh nanoModifications
Once the OpenSSH server is installed, you need to change a few settings so it's reachable over the network despite Android's limitations. Open the SSH config file:
nano /etc/ssh/sshd_config- Find the line
#Port 22and change it toPort 2222. - Find the line
#PermitRootLogin prohibit-passwordor#PermitRootLogin yesand change it toPermitRootLogin yes. If it already saysPermitRootLogin yes, you don't need to change anything. - When you're done, press
CTRL+X, typeYand pressEnterto save.
Connect
Run the following command:
ip aand copy the IP address listed under wlan. To connect to the SSH server, run:
ssh root@localhost -p 2222and log in with the password you set earlier.
Make It Faster
Speed up your Andronix desktop with the light profile (andronix tune), a lighter desktop, the right display app, and a few habits.
Modded OS Editions
Andronix Modded OS are paid, performance-tuned Linux distros with themes and essential software preinstalled, so you can skip setup and start working.