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 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?

marked as duplicate by Firelord Jan 10 at 20:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.