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

10 lines
No EOL
301 B
Bash
Executable file

#!/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