by Devin Yang

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

纪录我如何在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如何停用IPV6功能在特定的设备上

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

vim, macos

Ultisnips requires py >= 2.7 or py3 问题修正

如果你跟我一样安装Vim,运行terminal是否会出现需要python2.7或python3的错误,但是系统明明就有python 2.7呀, 本文说明我如何修正此问题。