Skip to content

Instantly share code, notes, and snippets.

@vdm
Last active November 23, 2023 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vdm/ea3cada07dbb2be68b33c364d0fe6fca to your computer and use it in GitHub Desktop.
Save vdm/ea3cada07dbb2be68b33c364d0fe6fca to your computer and use it in GitHub Desktop.
Import key from agent to EC2
$ aws --version
aws-cli/2.11.21
$ aws ec2 import-key-pair --public-key-material "$(ssh-add -L)" --key-name $USER
Invalid base64:
$ aws --cli-binary-format raw-in-base64-out ec2 import-key-pair --public-key-material "$(ssh-add -L)" --key-name $USER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment