neb/tools/migration/setup-keys-from-link.sh

10 lines
301 B
Bash
Raw Permalink Normal View History

2023-10-29 17:24:17 +01:00
#!/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