         [1m[23m[39m[49m[24m[29mUsing rsync on Android to syncronise my Music library[0m
                                    
                                 Never
                                    
                               [22m[3m[39m[49m[24m[29m2026-01-12[0m
                                    
                          ────────────────────

[1m[23m[39m[49m[24m[29mSETUP TERMUX[0m

Install Termux using F-Droid.

Update software repos.

    [0m[0m[22;23;24m[0m[22;23;24mpkg[0m[22;23;24m[0m[22;23;24m update[0m[22;23;24m[0m

Grant file access permissions using.

    [0m[0m[22;23;24m[0m[22;23;24mtermux-setup-storage[0m[22;23;24m[0m

[1m[23m[39m[49m[24m[29mESTABLISHING AN SSH CONNECTION[0m

If network (such as eduroam) is blocking ssh trafic between machines,
open a Wi-Fi Hotspot on your Linux machine and connect the Android
device to it before using [22m[23m[31m[47m[24m[29m rsync [0m or [22m[23m[31m[47m[24m[29m ssh [0m.

[1m[23m[39m[49m[24m[29mConfiguring Android[0m

Install the openssh server on Termux.

    [0m[0m[22;23;24m[0m[22;23;24mpkg[0m[22;23;24m[0m[22;23;24m install openssh[0m[22;23;24m[0m

Start the ssh server daemon.

    [0m[0m[22;23;24m[0m[22;23;24msshd[0m[22;23;24m[0m

Get the ip address of the Android machine (in the Hotspot).

    [0m[0m[22;23;24m[0m[22;23;24mifconfig[0m[22;23;24m[0m

    [22m[23m[31m[49m[24m[29mWarning: cannot open /proc/net/dev (Permission denied). Limited output.[0m
    [22m[23m[31m[49m[24m[29mlo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536[0m
    [22m[23m[31m[49m[24m[29m        inet 127.0.0.1  netmask 255.0.0.0[0m
    [22m[23m[31m[49m[24m[29m        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)[0m

    [22m[23m[31m[49m[24m[29mrmnet0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1280[0m
    [22m[23m[31m[49m[24m[29m        inet 10.200.157.166  netmask 255.255.255.0  destination 10.200.157.166[0m
    [22m[23m[31m[49m[24m[29m        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)[0m

    [22m[23m[31m[49m[24m[29mwlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500[0m
    [22m[23m[31m[49m[24m[29m        inet 10.42.0.200  netmask 255.255.255.0  broadcast 10.42.0.210[0m
    [22m[23m[31m[49m[24m[29m        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)[0m

In this case 10.42.0.200.

The ssh server should now be running and listening on port 8022. You can
check by running

    [0m[0m[22;23;24m[34;22;23;24mnmap[0m[22;23;24m[0m[22;23;24m [0m[22;23;24m[33;22;23;24m-Pn[0m[22;23;24m[0m[22;23;24m [0m[22;23;24m[90;22;23;24m<[0m[22;23;24m[0m[22;23;24mip_address[0m[22;23;24m[90;22;23;24m>[0m[22;23;24m[0m

For me [22m[23m[31m[47m[24m[29m <ip_address> [0m whould be 10.42.0.200.

Get the username.

    [0m[0m[22;23;24m[34;22;23;24mwhoami[0m[22;23;24m[0m

    [22m[23m[31m[49m[24m[29mu0_a700[0m

Set a password for this user.

    [0m[0m[22;23;24m[34;22;23;24mpasswd[0m[22;23;24m[0m

[1m[23m[39m[49m[24m[29mConnecting to Android via ssh[0m

Make sure you have an ssh key pair on the Linux system. If not generate
one using [22m[23m[31m[47m[24m[29m ssh-keygen [0m.

Now connect to Android by [22m[23m[31m[47m[24m[29m ssh [0m.

    [0m[0m[22;23;24m[34;22;23;24mssh[0m[22;23;24m[0m[22;23;24m [0m[22;23;24m[90;22;23;24m<[0m[22;23;24m[0m[22;23;24musername[0m[22;23;24m[90;22;23;24m>[0m[22;23;24m[0m[22;23;24m@[0m[22;23;24m[90;22;23;24m<[0m[22;23;24m[0m[22;23;24mip_address[0m[22;23;24m[90;22;23;24m>[0m[22;23;24m[0m[22;23;24m -p 8022[0m[22;23;24m[0m

[1m[23m[39m[49m[24m[29mSYNCRONISING FILES WITH RSYNC[0m

Install [22m[23m[31m[47m[24m[29m rsync [0m on Termux and Linux. Make sure to keep your own openssl
config.

    [0m[0m[22;23;24m[0m[22;23;24mpkg[0m[22;23;24m[0m[22;23;24m install rsync[0m[22;23;24m[0m

Now on your Linux machine, syncronise your Music library with rsync.

    [0m[0m[22;23;24m[34;22;23;24mrsync[0m[22;23;24m[0m[22;23;24m [0m[22;23;24m[33;22;23;24m-av[0m[22;23;24m[0m[22;23;24m [0m[22;23;24m[33;22;23;24m-e[0m[22;23;24m[0m[22;23;24m [0m[22;23;24m[36;22;23;24m"ssh -p 8022"[0m[22;23;24m[0m[22;23;24m ~/Music [0m[22;23;24m[90;22;23;24m<[0m[22;23;24m[0m[22;23;24musername[0m[22;23;24m[90;22;23;24m>[0m[22;23;24m[0m[22;23;24m@[0m[22;23;24m[90;22;23;24m<[0m[22;23;24m[0m[22;23;24mip_address[0m[22;23;24m[90;22;23;24m>[0m[22;23;24m[0m[22;23;24m:/data/data/com.termux/files/home/storage/music[0m[22;23;24m[0m
[0m]8;;\