Hi.
You have two Ubuntu: ubuntu-mobile (not available for connections from other network) and ubuntu-home (it’s in local network and it’s available for connections from your mobile phone and over internet). On ubuntu-home needs to be installed ssh server (sudo apt install openssh-server
).
Open terminal on ubuntu-mobile machine and create reverse tunnel:
ssh -fN -R ubuntu-mobile-IP:14000:localhost:4000 username-ubuntu-home@ubuntu-home-IP
or
ssh -fN -R *:14000:localhost:4000 username-ubuntu-home@ubuntu-home-IP
The first command allows you to connect through SSH tunnel from ubuntu-home machine, the second – form any address on the Internet. To connect open NoMachine Player set as IP ubuntu-home-IP and 14000 as Port (where 14000 is any unused port before ssh tunneling on ubuntu-home machine).