sudo -u jenkins mkdir -m 750 /var/lib/jenkins/.ssh-
Genereate
sshusingssh-keygen
sudo -u jenkins ssh-keygen -f /var/lib/jenkins/.ssh//id_rsa -t rsa -b 4096 -N ""-
Copy the
public keyand paste it underIAMuser → security credentials
cat ~/.ssh/id_rsa.pub-
Copy
SSH key IDand add it to.ssh/configfile with following information
Host git-codecommit.*.amazonaws.com
User {SSHKEYID}
IdentityFile ~/.ssh/id_rsaor
Host git-codecommit.*.amazonaws.com
User {SSHKEYID}
IdentityFile ~/.ssh/id_rsa
PubkeyAcceptedAlgorithms +ssh-rsa
HostkeyAlgorithms +ssh-rsa-
then, go to jenkin and add
SSH key IDtousernameand uploadprivatekey to thhe credential page.