Skip to content

Instantly share code, notes, and snippets.

@wendorf
Created February 8, 2016 22:05
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 wendorf/fa2856e2a05e8cd3201b to your computer and use it in GitHub Desktop.
Save wendorf/fa2856e2a05e8cd3201b to your computer and use it in GitHub Desktop.
Add this to the root of your USB drive to add your SSH key
#!/usr/bin/env bash
HOURS=$1
if [ -z $HOURS ]; then
echo "Usage: $0 <num hours>"
exit 1
fi
ssh-add -t ${HOURS}H $(dirname $0)/id_rsa
diskutil umount force $(dirname $0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment