From b7e00c56b219aac4499139a8490671fb5a4bd200 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Tue, 14 Mar 2023 18:29:30 -0300 Subject: Makefile: Use correct SSH public key in server --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index aa5da44..673247f 100644 --- a/Makefile +++ b/Makefile @@ -34,14 +34,18 @@ $(repo-secrets): gpg -aer eu@euandre.org < $(@D)/`basename $@ .gpg` > $@ -public-ssh = src/infrastructure/keys/SSH/root@euandre.org.id_rsa.pub.txt -upload-secrets: $(prod-secrets.txt) $(public-ssh) +public-ssh = src/infrastructure/keys/SSH/root@euandre.org.id_rsa.pub +$(public-ssh).stripped: $(public-ssh).txt + cut -d' ' -f6- < $(public-ssh).txt > $@ + + +upload-secrets: $(prod-secrets.txt) $(public-ssh).stripped ssh euandre.org sudo -u secrets-keeper 'rm -f /opt/secrets/*' rsync \ --rsync-path='sudo -u secrets-keeper rsync' \ --chmod=000 \ -avzP \ - $(prod-secrets.txt) $(public-ssh) euandre.org:/opt/secrets/ + $(prod-secrets.txt) $(public-ssh).stripped euandre.org:/opt/secrets/ ## Generate the ".ssh/authorized_keys" file and upload -- cgit v1.2.3