Work around AWS key management limitation

This commit is contained in:
Michael Vines 2018-11-07 18:47:52 -08:00
parent 2a6046de8e
commit 87ac549689
No known key found for this signature in database
GPG Key ID: 33F4FDEC4E0E88BD
1 changed files with 8 additions and 1 deletions

View File

@ -136,7 +136,14 @@ done
shift $((OPTIND - 1))
[[ -z $1 ]] || usage "Unexpected argument: $1"
sshPrivateKey="$netConfigDir/id_$prefix"
if [[ $cloudProvider = ec2 ]]; then
# EC2 keys can't be retrieved from running instances like GCE keys can so save
# EC2 keys in the user's home directory so |./ec2.sh config| can at least be
# used on the same host that ran |./ec2.sh create| .
sshPrivateKey="$HOME/.ssh/solana-net-id_$prefix"
else
sshPrivateKey="$netConfigDir/id_$prefix"
fi
case $cloudProvider in
gce)