Terminal emulator permission denied on complex commands
I've confirmed that it was SELinux fault. Running as the app linux user instead of root took me further but "rsync -e ./ssh" still didn't work.

Flashed a custom kernel without SELinux (getenforce returns Disabled) and now it works fine.

For this you have to know how to uncompress an official android image and change the boot.img file with the one with custom kernel, then compress again and flash with odin.

Any attempt at disabling selinux got me nowhere, only changing kernel worked.