Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to connect to Termux from Ubuntu desktop

In this example, we will setup a SSH server on Termux (for Android) and connect to the server from Ubuntu desktop. However, a similar procedure should work with any SSH server.

  1. Generate your ssh key pair on your desktop

    $ ssh-keygen
  2. Check your desktop IP address (say,

  3. Run ssh server on your desktop

  4. Copy the file to Termux over SCP

    $ scp arun@ ~/.ssh/authorized_keys

    You can stop ssh server on your desktop now

  5. Install ssh server on Termux

    $ pkg in openssh
  6. Run ssh server on Termux (IP address

    $ sshd
  7. Find out your username on Termux

    $ whoami
  8. Connect from your desktop

    $ ssh u0_z007@ -p 8022
    Welcome to Termux!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment