To access your instance:
- Open an SSH client. (find out how to connect using PuTTY)
- Locate your private key file (you_key_pair_name.pem). The wizard automatically detects the key you used to launch the instance.
- Your key must not be publicly viewable for SSH to work. Use this command if needed:
chmod 400 your_key_pair_name.pem
- Connect to your instance using its Public DNS:
ec2-31-322-46-116.us-west-2.compute.amazonaws.com
Example:
ssh -i your_key_pair_name.pem username@ec2-31-322-46-116.us-west-2.compute.amazonaws.com
Please note that in most cases the username above will be correct, however please ensure that you read your AMI usage instructions to ensure that the AMI owner has not changed the default AMI username.
Note:
Incase of Ubuntu distribution default username will be ubuntu.
Incase of other distributions default username will be ec2-user.
This document was got from amazon. Take care of user name username
Terminate instance:
1. right click on name of your instance and then select “terminate” option.
Advertisements
Leave a Reply