-
-
Save ben-axnick/b88e688d388e0c8a3289c654329e7917 to your computer and use it in GitHub Desktop.
Using yubikey 4c on Mac OS X (running Sierra)
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
GPG_ENV=$( gpg-agent --daemon 2>/dev/null ) | |
if [ $? == 0 ]; then | |
eval $GPG_ENV | |
else | |
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) | |
fi | |
export GPG_TTY=$(tty) | |
function copy-code() { | |
echo $1 |sed -e 's/[^ ]* //' |pbcopy | |
} | |
# Create an alias for each oauth credential you have. | |
alias awscode='copy-code "$(ykman oath code aws-oauth-credential-name)"' | |
function aws-code() { | |
ykman oath code envato-aws-users |sed -e 's/[^ ]* //' | |
} | |
# create an alias for each amazon account you login to | |
alias login-aws-admin='aws-vault login -t "$(aws-code)" aws-administrator' |
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
brew install gnupg swig pinentry-mac | |
pip install yubikey-manager |
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
pinentry-program /usr/local/bin/pinentry-mac | |
enable-ssh-support | |
default-cache-ttl 600 | |
max-cache-ttl 7200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment