Skip to content

bash script for aws cli authentication using an mfa token

Notifications You must be signed in to change notification settings

brute-force/aws-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

aws-auth

bash script for aws cli authentication using an mfa token. source the script instead of just executing it so it preserves the newly set environment.

USAGE

  . ./aws-auth.sh {OPTIONS}
  
  Example:  . ./aws-auth -m arn:aws:iam::12345678:mfa/reuel -t TOKEN

OPTIONS:

   -m   arn of your virtual mfa device (stuff this in an environment variable for convenience)  
   -t   token generated by your mfa device

you can use a command line token generator (e.g. YubiKey Manager CLI) and run:

. ./aws-auth.sh -m arn:aws:iam::12345678:mfa/reuel -t `ykman oath code -s amazon`

to configure your credentials file instead of setting enviroment variables, use the other script:

./aws-auth.sh2 -m arn:aws:iam::12345678:mfa/reuel -t `ykman oath code -s amazon`

Releases

No releases published

Packages

No packages published

Languages