Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 906 Bytes

File metadata and controls

44 lines (33 loc) · 906 Bytes

Set up SSH

sudo -u jenkins mkdir -m 750 /var/lib/jenkins/.ssh
  • Genereate ssh using ssh-keygen

sudo -u jenkins ssh-keygen -f /var/lib/jenkins/.ssh//id_rsa  -t rsa -b 4096 -N ""
  • Copy the public key and paste it under IAM user → security credentials

cat ~/.ssh/id_rsa.pub
  • Copy SSH key ID and add it to .ssh/config file with following information

  Host git-codecommit.*.amazonaws.com
    User {SSHKEYID}
    IdentityFile ~/.ssh/id_rsa

or

  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 ID to username and upload private key to thhe credential page.