From 404d47f85edf0ff89203634d47305c4f0ce62add Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Fri, 19 Oct 2018 21:23:50 -0400 Subject: Add an atuh script for SSH... kind of dangerous for systems you care about, but it works. --- keys/auth.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 keys/auth.sh (limited to 'keys') 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" -- cgit v1.2.3