Posts

Showing posts with the label server

Run an SSH server on your Android with Termux

Run an SSH server on your Android with Termux With the brilliant Termux terminal emulator app you can run an SSH server on your Android. Perviously I used SSHDroid to achieve this, but with Termux is much nicer because you have access to a working package manager. Run the service You neet to install the OpenSSH package apt install openssh and use following command to start the ssh server. sshd And there you go. Your ssh service is now running on port 8022. ssh localhost -p 8022 Adding your Public key You can't do password authentication in Termux, therefore you need to put your OpenSSH public key into the ~/.ssh/authorized_keys file. This file will need to be created and permissions set to 600. touch ~/.ssh/authorized_keys # Set Permissions to the file chmod 600 ~/.ssh/authorized_keys # Make sure the folder .ssh folder has the correct permissions chmod 700 ~/.ssh If you do not have a OpenSSH key pair yet, you can gen