1
Fork 0

Make rsync setup script work

This commit is contained in:
prescientmoon 2024-05-30 02:52:46 +02:00
parent 2256063e5e
commit 10cb9364c6
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
2 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGfOoqEHKR8Cy1GF0XTqMiotJvv5BaHA9u4abTQRSIPO adrielus@lapetus

View file

@ -1,2 +1,9 @@
#!/usr/bin/env bash
scp ~/.ssh/id_ed25519.pub $(cat ../hosts/nixos/common/optional/services/restic/url.txt):.ssh/authorized_keys
# Create tmp file
tmpfile=$(mktemp)
# Concat files
cat hosts/nixos/*/keys/id_*.pub > $tmpfile
# Copy concat result
scp $tmpfile $(cat hosts/nixos/common/optional/services/restic/url.txt):.ssh/authorized_keys
# Cleanup file
rm -rf $tmpfile