As you’ve got ssh client working - you can just pull using scp, or even rsync over ssh… You’ve already said you’ve run termux-setup-storage - you should be able to see data in your Termux folders, from elsewhere on your phone…
e.g. on your Lubuntu machine … well - here’s me in ZSH on my Ubuntu 22.04 desktop :
- I’ve got two entries for my phone in ~/.ssh/config (it’s actually ~/.ssh/home and reference as an include in my ssh config) - the “homedung” entry uses the fixed DHCP lease IP address it gets over WiFi from my router :
╭─x@titan ~
╰─➤ grep -A 4 homedung .ssh/home
Host homedung dunghome
Hostname RE.DAC.T.ED
User u0_a206
Port 8022
Don’t need to even specify that it’s SSH - rsync does that automagically :
╭─x@titan ~/ResilioSync/Music/Rammstein
╰─➤ pwd
/home/x/ResilioSync/Music/Rammstein
╭─x@titan ~/ResilioSync/Music/Rammstein
╰─➤ ls -al
total 36
drwxrwxr-x 9 x x 4096 Dec 16 13:39 .
drwxrwxr-x 90 x x 4096 Dec 29 08:55 ..
drwxrwxr-x 3 x x 4096 Dec 15 15:54 1995-Herzeleid-FLAC
drwxrwxr-x 4 x x 4096 Dec 16 13:42 1997-Sehnsucht-JAP-FLAC
drwxrwxr-x 4 x x 4096 Dec 27 16:44 2001-Mutter-JAP-FLAC
drwxrwxr-x 6 x x 4096 Dec 16 13:46 2004-ReiseReise-JAP-FLAC
drwxrwxr-x 4 x x 4096 Dec 16 13:43 2005-Rosenrot-JAP-FLAC
drwxrwxr-x 2 x x 4096 Dec 15 15:53 2019-RAMMSTEIN-FLAC
drwxrwxr-x 2 x x 4096 Dec 15 15:53 2022-Zeit-FLAC
╭─x@titan ~/ResilioSync/Music/Rammstein
╰─➤ rsync -av ./1995-Herzeleid-FLAC homedung:~/storage/music/Rammstein/.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ED25519 key sent by the remote host is
SHA256:/SfOPQhONMpesZglCv5/eM+W/PJCgu12QlyuLwpKOjY.
Please contact your system administrator.
Add correct host key in /home/x/.ssh/known_hosts to get rid of this message.
Offending ED25519 key in /home/x/.ssh/known_hosts:86
remove with:
ssh-keygen -f "/home/x/.ssh/known_hosts" -R "[REDACTED]:8022"
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
X11 forwarding is disabled to avoid man-in-the-middle attacks.
UpdateHostkeys is disabled because the host key is not trusted.
sending incremental file list
1995-Herzeleid-FLAC/
1995-Herzeleid-FLAC/00-pregap.flac
1995-Herzeleid-FLAC/01-Wollt ihr das bett in flammen sehen.flac
1995-Herzeleid-FLAC/02-Der meister.flac
1995-Herzeleid-FLAC/03-Weisses fleisch.flac
1995-Herzeleid-FLAC/04-Asche zu asche.flac
1995-Herzeleid-FLAC/05-Seemann.flac
1995-Herzeleid-FLAC/06-Du riechst so gut.flac
1995-Herzeleid-FLAC/07-Das alte leid.flac
1995-Herzeleid-FLAC/08-Heirate mich.flac
1995-Herzeleid-FLAC/09-Herzeleid.flac
1995-Herzeleid-FLAC/10-Laichzeit.flac
1995-Herzeleid-FLAC/11-Rammstein.flac
1995-Herzeleid-FLAC/Rammstein - Herzeleid.cue
1995-Herzeleid-FLAC/Rammstein - Herzeleid.flac
1995-Herzeleid-FLAC/Rammstein - Herzeleid.log
1995-Herzeleid-FLAC/Covers/
1995-Herzeleid-FLAC/Covers/1.jpg
1995-Herzeleid-FLAC/Covers/2.jpg
1995-Herzeleid-FLAC/Covers/3.jpg
1995-Herzeleid-FLAC/Covers/4.jpg
1995-Herzeleid-FLAC/Covers/5.jpg
1995-Herzeleid-FLAC/Covers/6.jpg
1995-Herzeleid-FLAC/Covers/7.jpg
1995-Herzeleid-FLAC/Covers/8.jpg
1995-Herzeleid-FLAC/Covers/Back.jpg
1995-Herzeleid-FLAC/Covers/CD.jpg
sent 879,701,295 bytes received 507 bytes 11,499,369.96 bytes/sec
total size is 879,484,810 speedup is 1.00
Edit: note - above is “push” to the phone from my Linux PC as source… I tried the reverse of this and got an error :
╭─u0_a416@localhost ~/storage/music/Rammstein
╰─➤ rsync -av titan:~/ResilioSync/Music/Rammstein/1995-Herzeleid-FLAC . 255 ↵
ssh: Could not resolve hostname titan: No address associated with hostname
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(231) [Receiver=3.2.7]
Edit 2 : that was eventually fixed by me tweaking my ssh client config files in ~/.ssh/ - and had to use the IP address of the machine titan… Note - PULL “rsync” is MUCH MUCH slower than push!
This isn’t a showstopper for me - I prefer to use USB to transfer files anyway… So I won’t research that error further…
BTW - I ignore all those boring messages about a man in the middle attack - I’m also lazy - 'cause the fix is right there in the output :
remove with:
ssh-keygen -f "/home/x/.ssh/known_hosts" -R "[REDACTED]:8022"
Then over on my phone in TermUX :
╭─u0_a416@localhost ~
╰─➤ cd storage/music/Rammstein
╭─u0_a416@localhost ~/storage/music/Rammstein
╰─➤ ls -al
total 12
drwxrwx--- 3 root everybody 4096 Dec 30 08:57 .
drwxrwx--- 4 root everybody 4096 Dec 16 15:46 ..
drwxrwx--- 3 root everybody 4096 Dec 15 15:54 1995-Herzeleid-FLAC
╭─u0_a416@localhost ~/storage/music/Rammstein
╰─➤ ls -al 1995-Herzeleid-FLAC
total 736496
drwxrwx--- 3 root everybody 4096 Dec 15 15:54 .
drwxrwx--- 3 root everybody 4096 Dec 30 08:57 ..
-rw-rw---- 1 root everybody 17501 Dec 15 15:44 00-pregap.flac
-rw-rw---- 1 root everybody 41562409 Dec 15 15:44 '01-Wollt ihr das bett in flammen sehen.flac'
-rw-rw---- 1 root everybody 32127508 Dec 15 15:44 '02-Der meister.flac'
-rw-rw---- 1 root everybody 27560000 Dec 15 15:44 '03-Weisses fleisch.flac'
-rw-rw---- 1 root everybody 30243405 Dec 15 15:44 '04-Asche zu asche.flac'
-rw-rw---- 1 root everybody 33481849 Dec 15 15:45 05-Seemann.flac
-rw-rw---- 1 root everybody 38316971 Dec 15 15:45 '06-Du riechst so gut.flac'
-rw-rw---- 1 root everybody 44436010 Dec 15 15:45 '07-Das alte leid.flac'
-rw-rw---- 1 root everybody 34834440 Dec 15 15:45 '08-Heirate mich.flac'
-rw-rw---- 1 root everybody 28471071 Dec 15 15:45 09-Herzeleid.flac
-rw-rw---- 1 root everybody 33566900 Dec 15 15:45 10-Laichzeit.flac
-rw-rw---- 1 root everybody 32708759 Dec 15 15:45 11-Rammstein.flac
drwxrwx--- 2 root everybody 4096 Dec 15 15:54 Covers
-rw-rw---- 1 root everybody 1128 Dec 15 15:44 'Rammstein - Herzeleid.cue'
-rw-rw---- 1 root everybody 376781078 Dec 15 15:44 'Rammstein - Herzeleid.flac'
-rw-rw---- 1 root everybody 2626 Dec 15 15:44 'Rammstein - Herzeleid.log'
And - I can use my main music player - Android app “Music Folder Player Full” (as opposed to the “free” version) to browse to that folder and play content from it - like Rammstein.
Mostly I don’t need to do that - because mostly I use a shell script that runs “adb-sync” to sync my main phone Music collection folders, with my ResilioSync/Music share on my computes…
Because my phone’s not rooted, I can’t use TermUX to do stuff directly on the SD-Card… So - those ~/storage folders in TermUX are on the phone’s internal storage…
You might also like to investigate using adb-sync :
And if you have any luck using the “WiFi” version “ADB Channel” - let us know - because I’ve had ZERO success with it - but that’s not a show stopper for me - 'cause I mostly have my phone USB C connector rigged up to my Linux computer when I’m at home, or my work MacBook when I’m at the office.