Skip to content

Instantly share code, notes, and snippets.

@brantfaircloth
Created March 22, 2012 06:39
Show Gist options
  • Save brantfaircloth/2156680 to your computer and use it in GitHub Desktop.
Save brantfaircloth/2156680 to your computer and use it in GitHub Desktop.
  • start up ARDAgent (on remote machine via ssh):

    sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate \
        -configure -users bcf -access -on -restart -agent -privs -all -allowAccessFor -specifiedUsers
  • start tunnel (from local to remote):

    ssh -i keyfile -NfL 1202:127.0.0.1:5900 you@your.remote.ip.address
  • connect w/ (on local machine):

    vnc://127.0.0.1:1202
  • do stuff
  • disconnect VNC client
  • shut down ARDAgent (on remote machine via ssh):

    sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
        -deactivate -configure -access -off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment