Stop ssh daemon
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
Start ssh daemon
sudo launchctl load /System/Library/LaunchDaemons/ssh.plist
Stop ssh daemon
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
Start ssh daemon
sudo launchctl load /System/Library/LaunchDaemons/ssh.plist