I forgot to turn on "VNC viewers may control screen with password", to enter on my working Mac, is there way to turn-on this feature remotely via SSH (I'm on WindowsXP now)?

migrated from stackoverflow.com Nov 5 '11 at 8:30

This question came from our site for professional and enthusiast programmers.

up vote 79 down vote accepted

Source: http://technotes.twosmallcoins.com/?p=279

Putty is a good SSH client for Windows.

1) SSH into your remote OS X machine with an administrator’s log in and password.

2) Enable Remote Desktop (a.k.a. Screen Sharing, a.k.a. VNC) with this command:

sudo  /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw mypasswd -restart -agent -privs -all

3) Login using a VNC client. As I mentioned, TightVNC worked for me; for some reason, RealVNC and UltraVNC didn’t. Your password is “mypasswd” (see the -vncpw flag in the above command; you can and should change this).

4) When you are done, turn of screen sharing using your SSH session:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off
  • 2
    Amazing! Works! – StNickolay Nov 4 '11 at 22:43
  • One thing that Mac RD quite unusable for me (very slowly)... as opossed to windows RDC, which is pretty good. – StNickolay Nov 4 '11 at 23:04
  • Have you tried Vine Server? – StNickolay Nov 4 '11 at 23:11
  • I've never worked with VNC before. Only with SSH once to let my desktop start downloading a file upstairs in my room so that my laptop didn't have to keep running in the living room :p – RobinJ Nov 4 '11 at 23:13
  • 2
    3+ years later and works perfectly in Yosemite. Thanks! – Jordan Feb 22 '15 at 2:19

Here is a different way that enables screen sharing access all current users, instead of using a single vnc password;

sudo  /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -configure -allowAccessFor -allUsers -configure -restart -agent -privs -all

Disable the same as before.

This allows you to connect to the remote computer from a mac using the share screen button in Finder.

Reference: http://ss64.com/osx/kickstart.html

  • 2
    For posterity: if you do this, you can also connect via /System/Library/CoreServices/Screen Sharing.app. – Dougal May 27 '13 at 20:50
  • Note that you can (very) easily launch the Screen Sharing app using a Spotlight search – Vincent Robert Nov 7 '16 at 22:05
  • doesn't work for me on macOS Sierra 10.12 – SegFault Jul 19 '17 at 14:20

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.