Logon to the Instance
To log on to the instance, we need the username, the ssh key, and the hostname.
The username is ec2-user
.
The ssh key is the one chosen when the instance was created. For this example we've used the key key_name
with the private key located at $HOME/.ssh/key_name.pem
.
The hostname is the PublicDNS of the instance.
Console - user@hostname ~ $
1
ssh -i $HOME/.ssh/key_name.pem ec2-user@PublicDNS
Note: Make sure that the EC2 security group allows tcp port 22 for the appropriate IP block. See Create an EC2 Security Group for more details.