diff options
Diffstat (limited to 'sshtool')
-rwxr-xr-x | sshtool | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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%.*} |