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:
ssh -i your_key_pair_name.pem email@example.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.
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
1. right click on name of your instance and then select “terminate” option.