commit f1dff2cca82f38f22a8a51084bfd03e06a95e74e
parent b4f34eb49205c8352c584ab91c253d2b12963717
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Sat, 30 May 2020 06:28:40 +0200
Use 2fa from pass-otp
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.local/bin/auvpn b/.local/bin/auvpn
@@ -7,7 +7,8 @@ if [ "$(id -u)" = 0 ]; then
fi
pass="$(gpg2 -q -d ~/.password-store/Uni/mit.au.dk-217756.gpg)"
+authcode="$(pass otp Uni/2fa-au217756)"
-doas sh -c "printf '%s' '$pass' | \
+doas sh -c "printf '%s\n%s' '$pass' '$authcode' | \
openconnect -u au217756@uni.au.dk --passwd-on-stdin \
https://remote.au.dk/st"