I created two ec2 instances, and was able to ssh into the first two fine. After creating the third, I get this error upon trying to ssh into any of them.
This is what I'm running:
ssh -v -i /Users/name/meteor.pem ubuntu@52.27.126.###
To get:
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 102: Applying options for *
debug1: Connecting to 52.25.###.## [52.25.###.##] port 22.
debug1: Connection established.
debug1: identity file /Users/name/.ssh/meteor.pem type -1
debug1: identity file /Users/name/.ssh/meteor.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<##92) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 3f:5a:e4:15:3e:c6:ee:f4:6e:97:59:02:ee:df:e2:a5
debug1: Host '52.25.###.##' is known and matches the RSA host key.
debug1: Found key in /Users/name/.ssh/known_hosts:13
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/name/.ssh/github_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /Users/name/.ssh/meteor.pem
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
I've tried this post's suggestion:
sudo chmod 700 ~/.ssh/
sudo chmod 600 ~/.ssh/*
sudo chown -R User ~/.ssh/
sudo chgrp -R User ~/.ssh/
but the line chgrp -R User ~/.ssh/
gives me the error chgrp: mycomputerusername: illegal group name
I can't figure out what the group name should be. My aws account username?
I also have no idea what I did to cause this error. Every time I create a new pem I run chmod 600 meteor.pem
, so maybe I entered this line wrong and it's causing permissions problems?
Any suggestions about what to try next would be greatly appreciated!