How to connect 2 Macs via SSH on a home network?

First off, I'm not 100% sure this question is on-topic on StackOverflow, but here you go :

I've set up a home network :

  • 1 wireless router connected to the internet
  • my 2 Macs connected to the wireless router

Is there any way I could use SSH to connect from my Mac No 1 to my Mac No 2?

And How?


Yes.

First, go to System Preferences -> Sharing. Turn on Remote Login (see image).

Then, from a terminal, execute:

$ ssh <machine name>.local

Remote Login