diff --git a/net/gce.sh b/net/gce.sh index 36c85db7fd..250bb116e6 100755 --- a/net/gce.sh +++ b/net/gce.sh @@ -630,6 +630,7 @@ $( cat \ disable-background-upgrades.sh \ create-solana-user.sh \ + solana-user-authorized_keys.sh \ add-testnet-solana-user-authorized_keys.sh \ install-certbot.sh \ install-earlyoom.sh \ diff --git a/net/scripts/add-testnet-solana-user-authorized_keys.sh b/net/scripts/add-testnet-solana-user-authorized_keys.sh index 57864e8b0c..3325d64019 100755 --- a/net/scripts/add-testnet-solana-user-authorized_keys.sh +++ b/net/scripts/add-testnet-solana-user-authorized_keys.sh @@ -6,13 +6,14 @@ set -ex [[ -d /home/solana/.ssh ]] || exit 1 -cd "$(dirname "$0")" -# shellcheck source=net/scripts/solana-user-authorized_keys.sh -source solana-user-authorized_keys.sh + +if [[ -z $SOLANA_PUBKEYS ]]; then + echo "Warning: source solana-user-authorized_keys.sh first" +fi # solana-user-authorized_keys.sh defines the public keys for users that should -# automatically be granted access to ALL testnets. +# automatically be granted access to ALL testnets for key in "${SOLANA_PUBKEYS[@]}"; do echo "$key" >> /solana-authorized_keys done diff --git a/net/scripts/solana-user-authorized_keys.sh b/net/scripts/solana-user-authorized_keys.sh index 456e84bbc1..2c1bdc6552 100644 --- a/net/scripts/solana-user-authorized_keys.sh +++ b/net/scripts/solana-user-authorized_keys.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +# # Contains the public keys for users that should automatically be granted access # to ALL testnets and datacenter nodes. # @@ -8,6 +8,7 @@ # 3. Add an entry to SOLANA_PUBKEYS with the contents of ~/.ssh/id-solana-testnet.pub # # If you need multiple keys with your username, repeatedly add your username to SOLANA_USERS, once per key +# SOLANA_USERS=() SOLANA_PUBKEYS=()