April 2018
Intermediate to advanced
280 pages
8h 37m
English
For connection to Linux instance, the user must use the SSH key pair. Sometimes, the SSH key has problems and users cannot connect to their Linux instances.
In such cases, the first step is to invoke the ssh command using the -vvv parameter, which prints verbose debug messages. These messages provide a more specific message about the cause of the connection failure:
ssh -vvv -i [your key name].pem ec2-user@[public DNS address of your instance].compute-1.amazonaws.com
Also, ensure that you use the correct username to connect to the EC2 instance. AWS has different usernames for different operating system instances.