[cs615asa] SSH connection problem solved! share some experiences
hchen29 at stevens.edu
Thu Jan 29 18:29:16 EST 2015
Thanks everyone who gives me advice. The problem with my ssh connection
problem has solved. Here I want to share my experience with you.
1.Description of the problem:
After I run the instance, I cannot use ssh to connect to the instance.
It always gives out the message "Permission denied(publickey)".
There are two possible reasons for this error:
(1) your private key is not correct
(2) the username you use to connect to the instance is incorrect.
(1) Check your private key file. After using command "create-key-pair",
the output is the private key with fingerprint at the very beginning and
the name of the key pair at last. Your private key file should should
not include those two parts. Just keep the ----begin RSA--- to ---the
end of RSA--- part. At first, I didn't delete the fingerprint and the
name at last, then the private key cannot be recognized.
(2) If you have a correct private key file, but error goes on, then you
should check the username.
"ssh -i mykey USERNAME at ec2-*-*-*.com"
The username are different by the providers. It's decided by which
image do you use. Here is a link from Amazon to tell you which username
do you need to use.
If it is because that you use a wrong username, the problem may have
another situation. It will ask you to enter password to login the
I hope this can help someone with the same problem. Again, thank you for
More information about the cs615asa