Setting up users

Lab Test’s SSH setup is based on a great article about managing SSH access through IAM. The IAM documentation has more information about using SSH keys and SSH with AWS CodeCommit.

  1. Get the user’s public key. It will look something like:

    ssh-rsa EXAMPLE-AfICCQD6m7oRw0uXOjANBgkqhkiG9w0BAQUFADCBiDELMAkGA1UEBhMCVVMxCzAJB
    gNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb2
    5zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wHhc
    NMTEwNDI1MjA0NTIxWhcNMTIwNDI0MjA0NTIxWjCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAw
    DgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDAS=EXAMPLE user-name@ip-192-0-2-137
    
  2. Sign into the IAM console.

  3. In the IAM console, in the navigation pane, choose Users.

    The IAM console
  4. Click on the appropriate user. (If you need to create the user, refer to the IAM documentation).

  5. On the user details page, choose the Security Credentials tab.

    The IAM User's security credentials tab
  6. Scroll down to the SSH keys for AWS CodeCommit section.

    The SSH keys for code commit section of the user page
  7. Choose Upload SSH public key.

  8. Paste the contents of the SSH public key into the field, and then choose Upload SSH public key.

    The upload SSH public key dialog
  9. Done!

Note

Some symbols in the IAM user name are changed for SSH. Specifically:

  • + to .plus.

  • = to .equal.

  • , to .comma.

  • @ to .at.

Also the length of the converted username must be 32 characters or less.