Skip to content

Instantly share code, notes, and snippets.

@hermes-pimentel
Created January 3, 2017 17:53
Show Gist options
  • Save hermes-pimentel/1347d2ac5ceaeb3038723006b7e8a82c to your computer and use it in GitHub Desktop.
Save hermes-pimentel/1347d2ac5ceaeb3038723006b7e8a82c to your computer and use it in GitHub Desktop.
Change ec2 .pem file
1) copy key to new instance. My-new-key.pem to .ssh
2) change permissions (chmod 400)
3) run as ec2-user/centos/ubuntu:
cd .ssh
ssh-keygen -f My-new-key.pem -y >> authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment