This question already has an answer here:
I learned that android is a variant of Linux.
With *nix, I could connect to another machine within the LAN (with identical wifi) by SSH
$ ssh email@example.com firstname.lastname@example.org's password: Welcome to Ubuntu 18.10 (GNU/Linux 4.18.0-13-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage
How could I connect to an android phone with this method?