MacOS – How to verify if SSH is disabled with the Terminal on Sierra

macossshterminal

I would like to know the command line to verify the status of SSH on Sierra please.

I tried using systemctl but got a command not found.

Thanks !

Best Answer

sudo systemsetup -getremotelogin

This will return "Remote Login: On" or "Off" depending on the state of the Remote Login option in Sharing.prefpane.

There's no such thing as systemctl on macOS, but systemsetup does many things; check the list with sudo systemsetup -help.