Last active
January 7, 2022 18:09
-
-
Save JimOfLeisure/0e779c8610889e3b823ccf63ce087552 to your computer and use it in GitHub Desktop.
A copy & paste thing to enter AWS keys without having them show up in command history or on-screen
This file contains hidden or 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
echo "Paste in AWS_ACCESS_KEY_ID" && \ | |
read -s AWS_ACCESS_KEY_ID && \ | |
echo "Paste in AWS_SECRET_ACCESS_KEY" && \ | |
read -s AWS_SECRET_ACCESS_KEY && \ | |
export AWS_ACCESS_KEY_ID && \ | |
export AWS_SECRET_ACCESS_KEY && \ | |
echo "aws key ready for use" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On machines where I don't have a secure way to store AWS credentials I've been using
read -s
to enter them so the key and secret don't appear in command history or on-screen. I just whipped this up as a one-shot copy/paste so I can paste it in the shell then copy/paste the key and secret from my password safe app.Note that the key and secret are still available to anything in that context that bothers to look at the environment, so only use this in shells with things you want to grant access to aws.