by Devin Yang

建立于: 4年前 ( 更新: 4年前 )

纪录我如何在MacOS上重启sshd服务。
#ssh进入远程的MAC,运行不会断线,可以分开运行,unload时不可注销,不然再也连不进去,
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist

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

#可以一行搞定unload跟load
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist&&sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist

Tags: MacOS

Devin Yang

文章内容无法一一说明,如果您有什么不了解处,欢印提问哦:)

No Comment

Post your comment

需要登入才可留言!

类似文章


MacOS

找MacOS的ip位置

如何找寻Mac的位置

MacOS

在MacOS如何停用IPV6功能在特定的设备上

如何在自己的MacOS停用或激活IPV6,可以用networksetup -listallnetworkservices列出所有MacOS的网络设备,然后再运行停用命令。

macos

关於MacOS上的ditto命令

ditto命令第一次出现在Mac OS X (10.0)在一些状况下,他比cp命令直觉还好用,有兴趣的人可自行研究测试。假定我的目录下有个envs数据夹,我的测试如下: