Last active
December 23, 2015 07:19
-
-
Save rgbkrk/6599713 to your computer and use it in GitHub Desktop.
clip to key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Take a clipboard saved Server Private Key from Rackspace's deployment panel, clean it up. | |
# | |
# Requires OS X. Hipster jeans optional. | |
# | |
# Usage: | |
# clipkey ~/key | |
# | |
# Takes whatever is in your clipboard, puts it in the file specified as the first argument, | |
# trims off the junk Rackspace adds, and tightens permissions. | |
# | |
# Yes, this is ridiculous. Hopefully the cloud control panel gets better. | |
# If only I could make pull requests on it. | |
# | |
set -e | |
pbpaste | sed 's/Server Private Key: //' > $1 | |
chmod go-rwx $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment