diff --git a/home/private_dot_ssh/run_onchanges_after_decrypt-ssh-keys.tmpl b/home/private_dot_ssh/run_onchanges_after_decrypt-ssh-keys.tmpl index f5c0c174..8ab6e5b7 100644 --- a/home/private_dot_ssh/run_onchanges_after_decrypt-ssh-keys.tmpl +++ b/home/private_dot_ssh/run_onchanges_after_decrypt-ssh-keys.tmpl @@ -5,7 +5,7 @@ {{ includeTemplate "universal/logg" }} logg info 'Decrypting SSH keys stored in the `home/.chezmoitemplates/ssh` folder of the Install Doctor repo / fork.' -find "{{ .chezmoi.sourceDir }}/.chezmoitemplates/ssh" -type f -maxdepth 1 ! -name "*.pub" ! -name "authorized_keys*" ! -name "known_host*" ! -name "config" | while read SSH_FILE; do +find "{{ .chezmoi.sourceDir }}/.chezmoitemplates/ssh" -type f | while read SSH_FILE; do ### Decrypt SSH file with Chezmoi logg info 'Decrypting the $(basename "$SSH_FILE") encrypted SSH file' chezmoi decrypt "$SSH_FILE" > "$HOME/.ssh/$(basename "$SSH_FILE")" || EXIT_CODE=$? diff --git a/home/private_dot_ssh/run_onchanges_after_generate-public-keys.tmpl b/home/private_dot_ssh/run_onchanges_after_generate-public-keys.tmpl index 196fdc52..3f95ae2a 100644 --- a/home/private_dot_ssh/run_onchanges_after_generate-public-keys.tmpl +++ b/home/private_dot_ssh/run_onchanges_after_generate-public-keys.tmpl @@ -12,7 +12,7 @@ logg info 'Ensuring public keys are present' -find "$HOME/.ssh" -type f | while read FILE; do +find "$HOME/.ssh" -maxdepth 1 ! -name "*.pub" ! -name "authorized_keys*" ! -name "known_host*" ! -name "config" | while read FILE; do if [ ! -f "${FILE}.pub" ]; then logg info 'Generating missing public key for `'"$FILE"'`' ssh-keygen -f "$FILE" -y > "${FILE}.pub"