My Termux Setup - SSH and WebDAV

This is my termux cli environment setup on my android phone.

My SSH and WebDAV servers work with Termux:Boot from F-Droid.

$ pwd /data/data/com.termux/files/home/.termux/boot
$ ls
start-sshd
start-webdav

SSH server setup:

  1. It runs on the sshd utility installed via pkg update && pkg install openssh
  2. SSH configuration lies in /data/data/com.termux/files/usr/etc/ssh/
  3. My public key lies in ~/.ssh/authorized_keys
  4. SSH Port is 8022

Autostart Script/Daemon:

$ cat ~/.termux/boot/start-sshd 
#!/data/data/com.termux/files/usr/bin/sh 
termux-wake-lock 
sshd

WebDAV server setup:

  1. Runs of a cli utility called ‘dufs’.
  2. All the configuration is in the command line parameters in the boot script.

Autostart Script/Daemon:

$ cat ~/.termux/boot/start-webdav 
#!/data/data/com.termux/files/usr/bin/sh 
termux-wake-lock 
dufs /sdcard -p 38080 --bind 100.110.34.101 --allow-all -a "alan:password123/:rw" >> ~/dufs.log 2>&1 &