How to Turn On SSH on Mac
All Macs have a bundled SSH server that is disabled by default, but can be turned on at any time if you’d like to grant remote command line access to a machine.
The SSH server in MacOS is turned on by using a sharing feature called Remote Login. With Remote Login enabled, the Mac now has SSH and SFTP available to it for remote connections.