How To Obtain a Public Key from and AWS .pem Private Key on Linux and Mac

Author: , February 4th, 2019

Use the ssh-keygen command on a computer to which you’ve downloaded your private key .pem file; for example: First, ensure permissions will allow ssh-keygen to work: chmod 600 /path/to/the/file/your-key-pair.pem Then generate an RSA public key: ssh-keygen -y -f /path/to/the/file/your-key-pair.pem > your-key-pair.pub

How To Get root Access To An AWS Instance At Launch

Author: , August 3rd, 2011

First use SSH to login as the ec2-user: 1 2 3 ssh -i AWSKeyPair.pem ec2-user@{NewHostName} % sudo su – # ssh -i AWSKeyPair.pem ec2-user@{NewHostName} % sudo su – # erics@zeus:/Users/erics # ssh -i foo.pem ec2-user@thehost.foo Last login: Tue Nov 19 20:28:19 2013 from foo.bar __| __|_ ) _| ( / Amazon Linux AMI ___|\___|___| https://aws.amazon.com/amazon-linux-ami/2013.09-release-notes/ […]