diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2018-10-19 21:23:50 -0400 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2018-10-19 09:23:50 -0400 |
| commit | 404d47f85edf0ff89203634d47305c4f0ce62add (patch) | |
| tree | 5bb071ce4be14c8e3d958e39cefcd709014d9861 | |
| parent | f7d8050336c36fc7c5f49f6c99d0081cf2eb3574 (diff) | |
| download | dotfiles-404d47f85edf0ff89203634d47305c4f0ce62add.tar.gz dotfiles-404d47f85edf0ff89203634d47305c4f0ce62add.tar.xz | |
Add an atuh script for SSH... kind of dangerous for systems you care about, but it works.
| -rwxr-xr-x | keys/auth.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/keys/auth.sh b/keys/auth.sh new file mode 100755 index 0000000..15313a0 --- /dev/null +++ b/keys/auth.sh @@ -0,0 +1,17 @@ +#!/bin/sh +_timeout=5 +_url="https://www.rygel.us/etc/keys/personal" +cache="/etc/ssh/keys" + +_temp="$(mktemp)" + +if curl \ + --connect-timeout $_timeout \ + "$_url" > "$_temp" 2>/dev/null +then + cat "$_temp" | tee $cache +else + cat $cache +fi + +rm "$_temp" |
