i could not ssh into my machine - the ssh process does not seem to be trying the right key (i could be wrong). By the way, this was after a reboot.

The keypair that is typically used is:

/Users/mingyeow/.ssh/id_rsa-gsg-keypair

FAILED TO SSH ON REBOOTED MACHINE

debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/mingyeow/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /Users/mingyeow/.ssh/identity
debug1: Trying private key: /Users/mingyeow/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).

SUCCESS TO SSH ON ANOTHER MACHINE ON SAME EC2 ACCOUNT

debug1: Next authentication method: publickey
debug1: Offering public key: /Users/mingyeow/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Offering public key: /Users/mingyeow/.ssh/id_rsa-gsg-keypair
debug1: Server accepts key: pkalg ssh-rsa 
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
link|improve this question
feedback

1 Answer

up vote 2 down vote accepted

Try :

ssh -i ~/.ssh/id_rsa-gsg-keypair user@...amazonaws.com

If that works, then stick something like the following in your ~/.ssh/config

Host *amazonaws.com
    IdentityFile ~/.ssh/id_rsa-gsg-keypair
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.