Cleanup and some stuff
This commit is contained in:
parent
69eca1f684
commit
87d0b3db57
7 changed files with 5768 additions and 23 deletions
13
bin/quickcreds.sh
Executable file
13
bin/quickcreds.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eou pipefail
|
||||
|
||||
host=$1; shift
|
||||
|
||||
contents=$(printf "\n[default]\naws_access_key_id = %s\naws_secret_access_key = %s\naws_session_token = %s\n" \
|
||||
$(aws-vault exec $AWS_PROFILE -j | jq -r .AccessKeyId,.SecretAccessKey,.SessionToken))
|
||||
aws-vault exec $AWS_PROFILE -- ssh -T $host <<EOF
|
||||
mkdir -p ~/.aws
|
||||
chmod 0700 ~/.aws
|
||||
echo "$contents" > ~/.aws/credentials
|
||||
EOF
|
||||
Loading…
Add table
Add a link
Reference in a new issue