You can use the ssh command to connect to your EC2 instance. In order to do so, you need the following:
ssh -i “[/path/to/your/publicKey]” ec2user@[Public_IP_address_of_your_instance]
•ssh -i “/tmp/myKey.pem” email@example.com
Before you begin, please make sure that you have the following: putty, puttygen, pem file, and the public IP address to your instance.
From the Command Line on a Linux system outside of the AMI environment
ssh -i keyfile.pem ec2-user@<public_dns_name>