AWS SSH 和 RDS 权限被拒绝 - 公钥

咆哮者

我正在尝试SSH连接到我的 RDS 实例。两者都不起作用,给出相同的错误:

权限被拒绝(公钥)。

我已经在以下位置设置了我的凭据~/.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

我试过了:

  • 更改我对pem文件的权限chmod 600 ~/.ssh/clg-api-staging.pem

  • 将我的权限更改~/.ssh/700

  • 为端口22上的TCP 和端口上的MYSQL设置入站规则3306

在此处输入图片说明

这是我尝试通过配置文件登录时的消息:

$ 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 for clg-api-staging
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 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 for 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 to ec2-34-196-57-20.compute-1.amazonaws.com:22 as 'ec2-user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] 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' is known and matches the 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 that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/danniu/.ssh/github_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /Users/danniu/.ssh/clg-api-staging.pem
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).

这是尝试通过 Sequel PRO 连接到 RDS DB 时的消息:

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 [email protected] -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" does not exist
debug1: Connecting to 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 for 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 to ec2-34-196-57-20.compute-1.amazonaws.com:22 as 'ec2-user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] 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) to the 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 that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/danniu/.ssh/github_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /Users/danniu/.ssh/clg-api-staging.pem
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
普拉卡什26790

您无法直接通过 SSH 访问 AWS RDS 实例。您可以通过 MySQL 客户端访问它。

  1. 安装 apt-get install MySQL-server -y
  2. 跑步 MySQL -h clg-api-staging -P password -p

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

AWS SSH连接错误:权限被拒绝(公钥)

来自分类Dev

AWS EC2 SSH访问-权限被拒绝(公钥)

来自分类Dev

AWS OpsWorks SSH直接连接权限被拒绝(公钥)

来自分类Dev

SSH权限被拒绝(公钥)

来自分类Dev

SSH权限被拒绝(公钥)

来自分类Dev

ssh权限被拒绝(公钥)

来自分类Dev

'ssh localhost'给出'权限被拒绝(公钥)。

来自分类Dev

与SSH混淆-权限被拒绝(公钥)

来自分类Dev

ssh权限被拒绝(公钥,键盘交互)

来自分类Dev

rsync:SSH权限被拒绝(公钥)

来自分类Dev

SSH连接错误-权限被拒绝(公钥)

来自分类Dev

SSH 时权限被拒绝(公钥)

来自分类Dev

Amazon Web Service(AWS)VPC专用子网实例“权限被拒绝(公钥)”。-来自osx的ssh

来自分类Dev

权限被拒绝(公钥),但公钥在本地和远程存在

来自分类Dev

更改 ~/.ssh/authorized_keys 和 ~/.ssh 目录的权限后,我得到一个权限被拒绝(公钥)

来自分类Dev

无法克隆,可以SSH。“权限被拒绝(公钥)。”

来自分类Dev

Bitbucket权限被拒绝(公钥)。但是可以用ssh

来自分类Dev

OpenStack:SSH到虚拟机时,权限被拒绝(公钥)

来自分类Dev

vscode错误中的ssh:权限被拒绝(公钥,密码)

来自分类Dev

升级Fedora 33后ssh权限被拒绝(公钥)

来自分类Dev

SSH-服务器上的权限被拒绝(公钥)

来自分类Dev

SSH密钥,CYGWIN,BitBucket,权限被拒绝(公钥)

来自分类Dev

EC2 + ssh:权限被拒绝(公钥)

来自分类Dev

git与ssh错误:权限被拒绝(公钥,键盘交互)

来自分类Dev

无法SSH到服务器:权限被拒绝(公钥)

来自分类Dev

Raspberry Pi上的SSH权限被拒绝(公钥)

来自分类Dev

无法通过ssh连接到github;权限被拒绝(公钥)

来自分类Dev

SSH服务器权限被拒绝(公钥)

来自分类Dev

对Google计算引擎VM的SSH权限被拒绝(公钥)

Related 相关文章

  1. 1

    AWS SSH连接错误:权限被拒绝(公钥)

  2. 2

    AWS EC2 SSH访问-权限被拒绝(公钥)

  3. 3

    AWS OpsWorks SSH直接连接权限被拒绝(公钥)

  4. 4

    SSH权限被拒绝(公钥)

  5. 5

    SSH权限被拒绝(公钥)

  6. 6

    ssh权限被拒绝(公钥)

  7. 7

    'ssh localhost'给出'权限被拒绝(公钥)。

  8. 8

    与SSH混淆-权限被拒绝(公钥)

  9. 9

    ssh权限被拒绝(公钥,键盘交互)

  10. 10

    rsync:SSH权限被拒绝(公钥)

  11. 11

    SSH连接错误-权限被拒绝(公钥)

  12. 12

    SSH 时权限被拒绝(公钥)

  13. 13

    Amazon Web Service(AWS)VPC专用子网实例“权限被拒绝(公钥)”。-来自osx的ssh

  14. 14

    权限被拒绝(公钥),但公钥在本地和远程存在

  15. 15

    更改 ~/.ssh/authorized_keys 和 ~/.ssh 目录的权限后,我得到一个权限被拒绝(公钥)

  16. 16

    无法克隆,可以SSH。“权限被拒绝(公钥)。”

  17. 17

    Bitbucket权限被拒绝(公钥)。但是可以用ssh

  18. 18

    OpenStack:SSH到虚拟机时,权限被拒绝(公钥)

  19. 19

    vscode错误中的ssh:权限被拒绝(公钥,密码)

  20. 20

    升级Fedora 33后ssh权限被拒绝(公钥)

  21. 21

    SSH-服务器上的权限被拒绝(公钥)

  22. 22

    SSH密钥,CYGWIN,BitBucket,权限被拒绝(公钥)

  23. 23

    EC2 + ssh:权限被拒绝(公钥)

  24. 24

    git与ssh错误:权限被拒绝(公钥,键盘交互)

  25. 25

    无法SSH到服务器:权限被拒绝(公钥)

  26. 26

    Raspberry Pi上的SSH权限被拒绝(公钥)

  27. 27

    无法通过ssh连接到github;权限被拒绝(公钥)

  28. 28

    SSH服务器权限被拒绝(公钥)

  29. 29

    对Google计算引擎VM的SSH权限被拒绝(公钥)

热门标签

归档