Skip to content

Commit

Permalink
more rsync ssm
Browse files Browse the repository at this point in the history
  • Loading branch information
araman-m committed Jul 2, 2023
1 parent f490aff commit fd3df6a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/splunkconf-cloud-recovery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1257,12 +1257,10 @@ if (( splunkrsyncmode == 1 )); then
mkdir -p ${SPLUNK_HOME}/.ssh
chmod u=rwx,og-rwx ${SPLUNK_HOME}/.ssh
chown ${splunkuser}. ${SPLUNK_HOME}/.ssh
splunksshkeypriv=`aws ssm get-parameter --name splunk_ssh_key_rsync_priv --query "Parameter.Value" --output text --region $REGION`;
echo $splunksshkeypriv > ${SPLUNK_HOME}/.ssh/id_rsa
aws ssm get-parameter --name splunk_ssh_key_rsync_priv --query "Parameter.Value" --output text --region $REGION > ${SPLUNK_HOME}/.ssh/id_rsa
chown ${splunkuser}. ${SPLUNK_HOME}/.ssh/id_rsa
chmod u=rw,go= ${SPLUNK_HOME}/.ssh/id_rsa
splunksshkeypub=`aws ssm get-parameter --name splunk_ssh_key_rsync_pub --query "Parameter.Value" --output text --region $REGION`;
echo $splunksshkeypub >> ${SPLUNK_HOME}/.ssh/authorized_keys
aws ssm get-parameter --name splunk_ssh_key_rsync_pub --query "Parameter.Value" --output text --region $REGION >> ${SPLUNK_HOME}/.ssh/authorized_keys
chown ${splunkuser}. ${SPLUNK_HOME}/.ssh/authorized_keys
chmod u=rw,go= ${SPLUNK_HOME}/.ssh/authorized_keys
else
Expand Down

0 comments on commit fd3df6a

Please sign in to comment.