Make sure your phone is accessible from internet as explained here.
You need a rooted device.
Android phones nowadays aren't those old low-end devices, they can run a full-featured SSH server happily. And it's an easy recipe:
Get fully static sshd binary for your phone's architecture. See details below.
Create /etc/passwd and /etc/shadow. To add a ...
You need to run an SSH server on your Android phone. There are apps available, but simple solution is to go for Termux. Install app, then install packages openssh and termux-auth. Set password and start server:
~$ pkg install openssh termux-auth
If you want to use key authentication instead of password, create key pair on client with ssh-...
Yes this did used to be possible, it is still possible but it requires more on the target device these days.
On below Android 5.0 , it was easy to do what you're saying, however it started to become apparent very quickly that the majority of people did not use this for its intended purpose...
For example, you could previously check on elderly people's ...
I succeeded to boot by guessing the moment to enter the security gesture.
Pressing the power button for 10s flashes green on the screen.
If the touch doesn't respond, pressing again for 10s flashes again, and the gesture must be done timely.
What I have understood from your question:
You have two phones A and B, which are connected to internet through Mobile Data. Phone B has a SSH server running, listening on port 8022. You want to login from phone A to phone B, but since the later doesn't have a public IP, you want to create a reverse SSH tunnel from phone B to another SSH server running on ...