Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
keep password to spreadsheet in a script in git
mchyzer committed May 30, 2020
1 parent bc0aa16 commit e8528c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/passwordsToSpreadsheet.sh
@@ -0,0 +1,3 @@
#!/bin/bash

aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | select(.State.Name!="terminated") | select((.Tags[]|select(.Key=="env")|.Value) =="training")] | .[] | .InstanceId' | xargs -n 1 -I{} aws ec2 get-console-output --instance-id {} | gawk 'match($0, /abcdefg12345678,([0-9.]+),([0-9a-zA-Z]+),/, m) { print m[1], "\011student\011", m[2], "\011\011\011ssh -L 8443:localhost:8443 -l student ", m[1]; }'

0 comments on commit e8528c7

Please sign in to comment.