Friday, November 4, 2016

SSH to EC2 as a non root user directly


  1. Create a key pair under ec2 section (Example: mykp.pem)
  2. Download mykp.pem 
  3. Run this command from a linux shell to get the public key for the above .pem
    • ssh-keygen -y -f /directorypath/mykp.pem
    • Output will be ssh-rsa with long key 
  4. Add this key to the target server

No comments:

Post a Comment