by Devin Yang
(This article was automatically translated.)

Published - 4 years ago ( Updated - 4 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


MacOS

How to disable IPV6 functionality on a specific device in MacOS

How to disable or enable IPV6 on your own MacOS, you can use networksetup -listallnetworkservices to list all MacOS network devices, and then execute the disable command.

macos

About ditto instructions on MacOS

The ditto command appeared in Mac OS X (10.0) for the first time. In some cases, it is more intuitive than the cp command. Those who are interested can study and test it by themselves. Assuming that there is an envs folder in my directory, my test is as follows:

Emoji, MacOS

⌘+control+blank (Emoji on Mac)

⌘+control+blank (Emoji on Mac)