by Devin Yang
(This article was automatically translated.)

Published - 3 years ago ( Updated - 3 years ago )

Document how I restart sshd service on MacOS.
#ssh into the remote MAC, the execution will not be disconnected, and it can be executed separately. When unloading, you cannot log out, otherwise you will not be able to connect again.
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist

sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist

#You can handle unload and load in one line
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist&&sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist

Tags: MacOS

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


vim, macos

Ultisnips requires py >= 2.7 or py3 Bugfix

If you install Vim like me, will there be an error that python2.7 or python3 is required when executing the terminal, but the system obviously has python 2.7? This article explains how I fixed this issue.

vpn,cli,macos

How do I dial a VPN from the command line on MacOS

I myself will need to use MacOS to dial VPN in the command line. Here I provide my alias and setting method