SSH – Best Way to SSH to Machines on Local Network

networkingssh

I have 2 computers, one that I use and one for the kids. I want to be able to ssh into their computer to control it (like to shut it down etc) but am curious the best way to do this. We both are in the same house and share the same internet connection.

What would be the best way to do this? From research, I read to install openssh-server on the remote computer but am stumped what to use for the hostname when trying to connect. Usually for VPS's it's the external IP but since we both share a wifi connection would it be the hardware IP? Should we be interfacing directly by LAN or by going through the internet?

Best Answer

Run:

avahi-browse -tl _workstation._tcp

To get a list of Ubuntu workstations in the local network, then you can connect to them by running:

ssh <username>@<computer-name>.local
Related Question