How to restart SSH in Mac Pro?
When I used: sudo service ssh restart
its shows:
Command not found
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityTry with:
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
sudo /usr/sbin/sshd
in case it doesn't work? Also sudo systemsetup -setremotelogin on
in case it is not open.
Jan 20, 2021 at 13:46
sshd
differently enough that there's no real equivalent to "restart"ing the service. More specifically, a new server process is started for each incoming connection on port 22; this means that if there's no active ssh connection, there's nothing running to restart (and if there is one, you probably don't want to kill it). So... yeah, what's the actual goal here?