aboutsummaryrefslogtreecommitdiff
path: root/sshtool
diff options
context:
space:
mode:
Diffstat (limited to 'sshtool')
-rwxr-xr-xsshtool13
1 files changed, 13 insertions, 0 deletions
diff --git a/sshtool b/sshtool
index b5de384..1396c87 100755
--- a/sshtool
+++ b/sshtool
@@ -81,6 +81,19 @@ chmod 0600 $TO
EOF
}
+function write_pass {
+ local PASSKEY=$1
+ local TO=$2
+ cat <<EOF
+echo '- write secret $TO from pass $PASSKEY'
+base64 -d <<EOG | tee $TO > /dev/null
+$(pass $PASSKEY | base64)
+EOG
+chown root:root $TO
+chmod 0600 $TO
+EOF
+}
+
for NIXHOST in $NIXHOSTLIST; do
NIXHOST=${NIXHOST%.*}