SSH

  1. your router: assign a static server ip
  2. server: install openssh
    • Ubuntu: sudo apt install openssh
    • Termux: pkg install openssh
  3. server: start ssh daemon
    • Ubuntu: sudo systemctl restart ssh
    • Termux: sshd
  4. server: verify password auth is on
    • Ubuntu: /etc/ssh/sshd_config
    • Termux: $PREFIX/etc/ssh/sshd_config
    •   PasswordAuthentication yes
  5. server: Termux only: create an ssh password with passwd if needed
  6. client: create an ssh key pair
    • ssh-keygen -C "your.email@example.com"
  7. client: add server to config
    • ~/.ssh/config
    •   host enterprise user picard hostname 192.168.1.1701 port 22
    • termux uses port 8022 by default
  8. client: copy public key to server
    • ssh-copy-id enterprise
    • enter your password when prompted
  9. client: test success
    • ssh enterprise
  10. server: disable password auth
    • Ubuntu: /etc/ssh/sshd_config
    • Termux: $PREFIX/etc/ssh/sshd_config
    •   PasswordAuthentication no
  11. server: restart ssh daemon
    • Ubuntu: sudo systemctl restart ssh
    • Termux: pkill sshd && sshd
  12. profit

references: Linuxize and Termux Wiki

Last update: February 21, 2026