Configure SSH Connection to AWS CodeCommit
Step 1: Generate ssh key in your local system.
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): <Enter the file name Egs:codecommit_QARepo>
Enter passphrase (empty for no passphrase): <Enter the Password>
Enter same passphrase again:<Re-enter the Password>
Step 2: Copy the values of the SSH public key created.
$ cat ~/.ssh/codecommit_rsa.pub
Step 3 : Login to AWS IAM console >> Chose Users >> Chose your IAM user >> Chose Security
Credential >> Chose Upload SSH Key.
Paste the content of the SSH public key in to the "Upload SSH Key" section selected
Step 4: Copy and save the information in SSH Key id ,which created after Uploading the public key.
Step 5: Create config file in your local system and paste the SSH Key id in "user" section as below.
$ nano config
Host git-codecommit.*.amazonaws.com
User APKAEIBAERJR2EXAMPLE
IdentityFile ~/.ssh/codecommit_rsa
Step 6: Change config file permission
$ chmod 600 config
Step 7: Run below command to test the SSH Configuration.
$ ssh git-codecommit.us-east-1.amazonaws.com
Comments
Post a comment