Complete the code to specify the key pair file when connecting to an EC2 instance using SSH.
ssh -i [1] ec2-user@ec2-203-0-113-25.compute-1.amazonaws.com
The -i option specifies the private key file with a .pem extension used for SSH authentication.
Complete the command to connect to an EC2 instance with the correct username for Amazon Linux.
ssh -i my-key.pem [1]@ec2-198-51-100-1.compute-1.amazonaws.com
root which is disabled by defaultubuntu for Amazon Linux instancesAmazon Linux EC2 instances use ec2-user as the default SSH username.
Fix the error in the SSH command to connect to an EC2 instance by selecting the correct option for the port number.
ssh -i my-key.pem -p [1] ec2-user@ec2-54-172-12-34.compute-1.amazonaws.com
SSH uses port 22 by default. Using the correct port ensures the connection succeeds.
Fill both blanks to create a security group rule allowing SSH access from anywhere.
aws ec2 authorize-security-group-ingress --group-id sg-123abc --protocol [1] --port [2] --cidr 0.0.0.0/0
SSH uses the TCP protocol on port 22. This command opens port 22 for SSH access.
Fill all three blanks to create an SSH command that connects to an EC2 instance with a specific key, user, and IP address.
ssh -i [1] [2]@[3]
ubuntu for Amazon LinuxThe command uses the private key file my-ec2-key.pem, the default user ec2-user, and the instance's public IP address 54.201.123.45.