mysql - AWS SSH and RDS permission denied - public key -
i'm trying ssh
, connect rds instance. neither working, giving same error:
permission denied (publickey).
i've set credentials in ~/.ssh/config
:
host clg-api-staging hostname ec2-11-111-11-11.compute-1.amazonaws.com user ec2-user identityfile ~/.ssh/clg-api-staging.pem
i've tried:
changing permissions on
pem
file:chmod 600 ~/.ssh/clg-api-staging.pem
changing permissions on
~/.ssh/
700
set inbound rules tcp on port
22
, mysql on port3306
:
this message when try log in thru profile:
$ ssh -v clg-api-staging openssh_7.4p1, libressl 2.5.0 debug1: reading configuration data /users/danniu/.ssh/config debug1: /users/danniu/.ssh/config line 26: applying options clg-api-staging debug1: reading configuration data /etc/ssh/ssh_config debug1: connecting ec2-34-196-57-20.compute-1.amazonaws.com [34.196.57.20] port 22. debug1: connection established. debug1: key_load_public: no such file or directory debug1: identity file /users/danniu/.ssh/clg-api-staging.pem type -1 debug1: key_load_public: no such file or directory debug1: identity file /users/danniu/.ssh/clg-api-staging.pem-cert type -1 debug1: enabling compatibility mode protocol 2.0 debug1: local version string ssh-2.0-openssh_7.4 debug1: remote protocol version 2.0, remote software version openssh_6.6.1 debug1: match: openssh_6.6.1 pat openssh_6.6.1* compat 0x04000000 debug1: authenticating ec2-34-196-57-20.compute-1.amazonaws.com:22 'ec2-user' debug1: ssh2_msg_kexinit sent debug1: ssh2_msg_kexinit received debug1: kex: algorithm: curve25519-sha256@libssh.org debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: chacha20-poly1305@openssh.com mac: <implicit> compression: none debug1: kex: client->server cipher: chacha20-poly1305@openssh.com mac: <implicit> compression: none debug1: expecting ssh2_msg_kex_ecdh_reply debug1: server host key: ecdsa-sha2-nistp256 sha256:pathd/i/bustt1k3qkzjb4knjyiqjuofnpmpsot/5lg debug1: host 'ec2-34-196-57-20.compute-1.amazonaws.com' known , matches ecdsa host key. debug1: found key in /users/danniu/.ssh/known_hosts:24 debug1: rekey after 134217728 blocks debug1: ssh2_msg_newkeys sent debug1: expecting ssh2_msg_newkeys debug1: ssh2_msg_newkeys received debug1: rekey after 134217728 blocks debug1: skipping ssh-dss key /users/danniu/.ssh/id_dsa - not in pubkeyacceptedkeytypes debug1: ssh2_msg_service_accept received debug1: authentications can continue: publickey debug1: next authentication method: publickey debug1: offering rsa public key: /users/danniu/.ssh/github_rsa debug1: authentications can continue: publickey debug1: trying private key: /users/danniu/.ssh/clg-api-staging.pem debug1: authentications can continue: publickey debug1: no more authentication methods try. permission denied (publickey).
this message when attempting connect rds db via sequel pro:
used command: /usr/bin/ssh -v -n -s none -o controlmaster=no -o exitonforwardfailure=yes -o connecttimeout=10 -o numberofpasswordprompts=3 -i /users/danniu/.ssh/clg-api-staging.pem -o tcpkeepalive=no -o serveraliveinterval=60 -o serveralivecountmax=1 ec2-user@ec2-34-196-57-20.compute-1.amazonaws.com -l 55318:aa1tgl9qfl015rk.cuqlyug9ccbu.us-east-1.rds.amazonaws.com:3306 openssh_7.4p1, libressl 2.5.0 debug1: reading configuration data /users/danniu/.ssh/config debug1: reading configuration data /etc/ssh/ssh_config debug1: control socket " none" not exist debug1: connecting ec2-34-196-57-20.compute-1.amazonaws.com [34.196.57.20] port 22. debug1: fd 8 clearing o_nonblock debug1: connection established. debug1: key_load_public: no such file or directory debug1: identity file /users/danniu/.ssh/clg-api-staging.pem type -1 debug1: key_load_public: no such file or directory debug1: identity file /users/danniu/.ssh/clg-api-staging.pem-cert type -1 debug1: enabling compatibility mode protocol 2.0 debug1: local version string ssh-2.0-openssh_7.4 debug1: remote protocol version 2.0, remote software version openssh_6.6.1 debug1: match: openssh_6.6.1 pat openssh_6.6.1* compat 0x04000000 debug1: authenticating ec2-34-196-57-20.compute-1.amazonaws.com:22 'ec2-user' debug1: ssh2_msg_kexinit sent debug1: ssh2_msg_kexinit received debug1: kex: algorithm: curve25519-sha256@libssh.org debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: chacha20-poly1305@openssh.com mac: <implicit> compression: none debug1: kex: client->server cipher: chacha20-poly1305@openssh.com mac: <implicit> compression: none debug1: expecting ssh2_msg_kex_ecdh_reply debug1: server host key: ecdsa-sha2-nistp256 sha256:pathd/i/bustt1k3qkzjb4knjyiqjuofnpmpsot/5lg debug1: read_passphrase: can't open /dev/tty: device not configured debug1: permanently_drop_suid: 501 warning: permanently added 'ec2-34-196-57-20.compute-1.amazonaws.com,34.196.57.20' (ecdsa) list of known hosts. debug1: rekey after 134217728 blocks debug1: ssh2_msg_newkeys sent debug1: expecting ssh2_msg_newkeys debug1: ssh2_msg_newkeys received debug1: rekey after 134217728 blocks debug1: skipping ssh-dss key /users/danniu/.ssh/id_dsa - not in pubkeyacceptedkeytypes debug1: ssh2_msg_service_accept received debug1: authentications can continue: publickey debug1: next authentication method: publickey debug1: offering rsa public key: /users/danniu/.ssh/github_rsa debug1: authentications can continue: publickey debug1: trying private key: /users/danniu/.ssh/clg-api-staging.pem debug1: authentications can continue: publickey debug1: no more authentication methods try. permission denied (publickey).
if attempting connect rds using ssh, never going work. rds database service allows sql connections , not direct ssh or other administrator type access.
Comments
Post a Comment