Skip to content

Instantly share code, notes, and snippets.

@hughsaunders
Last active December 15, 2015 12:19
Show Gist options
  • Save hughsaunders/5259156 to your computer and use it in GitHub Desktop.
Save hughsaunders/5259156 to your computer and use it in GitHub Desktop.
Control bluetooth on a remote mac, so that its keyboard and mouse can be stolen or returned.
#!/usr/bin/env bash
#Restore bluetooth peripherals to the iMac
#ensure local bluetooth is off
blueutil off
#enable imac bluetooth
ssh imac27 '/usr/local/bin/blueutil on'
#!/usr/bin/env bash
#Steal bluetooth peripherals from iMac
#ensure local bluetooth is off
blueutil off
#disable imac bluetooth
ssh imac27 '/usr/local/bin/blueutil off'
#enable local bluetooth
blueutil on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment