Skip to content

Instantly share code, notes, and snippets.

@moaible
Created September 11, 2020 01:38
Show Gist options
  • Select an option

  • Save moaible/be368018805ab6d667524c404c14fdfe to your computer and use it in GitHub Desktop.

Select an option

Save moaible/be368018805ab6d667524c404c14fdfe to your computer and use it in GitHub Desktop.
Generate AWS SSH Setting
mkdir -p ~/.ssh
echo $GP_AWS_SSH_KEY_RSA | base64 -d > ~/.ssh/id_rsa
echo $GP_AWS_SSH_KEY_RSA_PUB | base64 -d > ~/.ssh/id_rsa.pub
echo -e "\n\
Host git-codecommit.*.amazonaws.com\n\
User $GP_AWS_SSH_KEY_ID\n\
IdentityFile ~/.ssh/id_rsa\n\
" > ~/.ssh/config
chmod 0600 ~/.ssh/id_rsa
chmod 0600 ~/.ssh/id_rsa.pub
chmod 0600 ~/.ssh/config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment