refactor: properly setup ssh

This commit is contained in:
Strix 2023-10-29 17:24:17 +01:00
parent 9e69924211
commit 8e84f59ef5
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774
6 changed files with 58 additions and 19 deletions

View file

@ -0,0 +1,10 @@
#!/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 root@link.ixvd.net:/etc/ixvd/secrets/ssh/keys/master/ixvd-master /root/.ssh/id_rsa
chmod 600 /root/.ssh/id_rsa