Google+ Followers

2013年10月23日 星期三

[OSX] 使用 Command line 啓動 VNC 和設定連線密碼 @ Mac OSX 10.8

如果說,都用 Mac OS X 遠端 Mac OS X,那的確不太需要設定 VNC 密碼,因為會轉換到 Mac OS X 自己的協定,但如果是從 Windows/Linux 連到 Mac OS X 的話,設定密碼還是安全一點點。

啓動 VNC:

$ sudo defaults write /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false
$ sudo launchctl load /System/Library/LaunchDaemons/com.apple.screensharing.plist


設定 VNC 密碼:

$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -off -restart -agent -privs -all -allowAccessFor -allUsers -clientopts -setvncpw -vncpw VNC_PASSWORD
Starting...
bind(): Address already in use
com.apple.screensharing: Already loaded
Activated Remote Management.
Stopped ARD Agent.
Stopped VNC Privilege Proxy
buffalo: Set user remote access.
macports: Set user remote access.
ookon: Set user remote access.
Set the client options.
Setting allow all users to YES.
Setting all users privileges to ##########.
Done.

沒有留言:

張貼留言