restart ssh service mac code example
Example: restart ssh service mac
# stop it
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
# start it
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
# stop it
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
# start it
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist