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 assistant@assistant.local
algorithms@assistant.local'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?

Browse other questions tagged or ask your own question.