feat: setup-server from link

This commit is contained in:
Strix 2023-10-30 00:56:13 +01:00
parent 8e84f59ef5
commit 26f3d9713e
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774

View file

@ -0,0 +1,17 @@
#!/bin/sh
if ! [ "$(id -u)" = "0" ]; then
echo "please perform as root, attempting to escalate privileges..."
exec sudo $(cat /proc/$$/cmdline | sed 's/\x00/ /g')
exit 1
fi
scp \
-i /etc/ixvd/secrets/ssh/keys/master/ixvd-master \
/etc/ixvd/secrets/ssh/keys/master/ixvd-master \
root@$1:.ssh/id_rsa
ssh \
-i /etc/ixvd/secrets/ssh/keys/master/ixvd-master \
root@$1 \
chmod 600 .ssh/id_rsa