Add pubkey setup for datacenter nodes (#5514)

This commit is contained in:
TristanDebrunner
2019-08-14 14:25:56 -06:00
committed by GitHub
parent d791c70d90
commit 79416381dc
6 changed files with 86 additions and 27 deletions

View File

@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -ex
[[ $(uname) = Linux ]] || exit 1
[[ $USER = root ]] || exit 1
[[ -d /home/solana/.ssh ]] || exit 1
cd "$(dirname "$0")"
# shellcheck source=net/scripts/solana-user-authorized_keys.sh
source solana-user-authorized_keys.sh
# solana-user-authorized_keys.sh defines the public keys for users that should
# automatically be granted access to ALL testnets.
for key in "${SOLANA_PUBKEYS[@]}"; do
echo "$key" >> /solana-authorized_keys
done
sudo -u solana bash -c "
cat /solana-authorized_keys >> /home/solana/.ssh/authorized_keys
"