refactor: properly setup ssh
This commit is contained in:
parent
9e69924211
commit
8e84f59ef5
6 changed files with 58 additions and 19 deletions
10
tools/migration/setup-keys-from-link.sh
Executable file
10
tools/migration/setup-keys-from-link.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue