[cs615asa] An error has occurred when I try to connect to ec2 instance

Jan Schaumann jschauma at stevens.edu
Mon Apr 14 17:47:45 EDT 2014


zwang60 <zwang60 at stevens.edu> wrote:

> zwang60 at avatar:~$ ssh -i mykeypair.pem
> fedora at ec2-54-81-79-177.compute-1.amazonaws.com
> Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

This is a very different error from the one you show later:

> zwang60 at avalon:~$ ssh -i mykeypair.pem -vvv
> fedora at ec2-54-81-79-177.compute-1.amazonaws.com
> OpenSSH_5.9p1 Debian-5ubuntu1.3, OpenSSL 1.0.1 14 Mar 2012
> debug1: Connecting to ec2-54-81-79-177.compute-1.amazonaws.com
> [54.81.79.177] port 22.
> debug1: connect to address 54.81.79.177 port 22: Connection timed out
> ssh: connect to host ec2-54-81-79-177.compute-1.amazonaws.com port 22:
> Connection timed out

The first error ("Permission denied") suggests that the isntance does
not accept your key for the 'fedora' user.  Perhaps get the console
output and see if it says anything about installing the keypair.

You also want to actually run the ssh command with '-vvv' and copy the
_full_ output for that error.

The second error ("Connection timed out") suggests that the security
group does not allow SSH.

I don't quite see how you get both of these errors on the same instance.
ec2-54-81-79-177.compute-1.amazonaws.com is currently accepting SSH from
linux-lab.cs.stevens.edu, so I would think the error would be the first
one.

Check the permissions on your private ssh key, too.

-Jan


More information about the cs615asa mailing list