SSH to Amazon EC2 Host

Once you have created your Amazon EC2 host you will need to assign a key to it. You can do this using your Amazon EC2 console. You will then want to have the private key on the host you wish to ssh FROM. To specify to use this key in ssh use the following command

ssh -i /path/to/privatekey ec2user@ec2-xxx-xxx-xxx-xxx.compute-x.amazonaws.com

This will use your private key to ssh to Amazon EC2 as the ec2user. Once logged in you can “sudo su – ” to get root privileges.

Be the first to comment

Leave a Reply