“restricted” folder/files in OS X El Capitan

后端 未结 7 1223
刺人心
刺人心 2020-11-28 21:00

After upgrading from OS X Yosemite to OS X El Capitan Developer Preview, I tried to edit /System/Library/LaunchDaemons/ssh.plist to change the default SSH

7条回答
  •  再見小時候
    2020-11-28 21:40

    Until 10.11 unprotects certain files in /System/Library or allows you to do it yourself, the only way without disabling SIP would be to make a different service by coping the file somewhere else, like:

    sudo cp /System/Library/LaunchDaemons/ssh.plist /Library/LaunchDaemons/ssh.plist
    

    And then instead of using the Sharing panel in System Preferences, you would manage the service yourself:

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

提交回复
热议问题