Make rsync setup script work
This commit is contained in:
parent
2256063e5e
commit
10cb9364c6
1
hosts/nixos/lapetus/keys/id_ed25519.pub
Executable file
1
hosts/nixos/lapetus/keys/id_ed25519.pub
Executable file
|
@ -0,0 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGfOoqEHKR8Cy1GF0XTqMiotJvv5BaHA9u4abTQRSIPO adrielus@lapetus
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue