【问题标题】:can't connect to RDS with EC2-SSH无法使用 EC2-SSH 连接到 RDS
【发布时间】:2021-07-29 11:15:31
【问题描述】:

突然我的sequel pro 不能正常工作了。

我通过 EC2 获得了续集连接 RDS。

设置似乎是正确的。

我选择了正确的 pem fale 来连接 SSH。

我不知道为什么会发生“没有更多的身份验证方法可以尝试。”

debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /Users/abc/.ssh/id_rsa
debug1: Will attempt key: /Users/abc/.ssh/id_dsa
debug1: Will attempt key: /Users/abc/.ssh/id_ecdsa
debug1: Will attempt key: /Users/abc/.ssh/id_ed25519
debug1: Will attempt key: /Users/abc/.ssh/id_xmss
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/abc/.ssh/id_rsa
debug1: Trying private key: /Users/abc/.ssh/id_dsa
debug1: Trying private key: /Users/abc/.ssh/id_ecdsa
debug1: Trying private key: /Users/abc/.ssh/id_ed25519
debug1: Trying private key: /Users/abc/.ssh/id_xmss
debug1: No more authentication methods to try.
ec2-user@ec2-23-214-216-2.ap-northeast-1.compute.amazonaws.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

【问题讨论】:

  • 为什么要通过 SSH 连接?您是否将 EC2 实例用作 Jump Box 来访问私有数据库?
  • 您的日志输出似乎没有像您配置的那样显示您提供使用~/Downloads/stacktest.pem

标签: amazon-web-services amazon-ec2 ssh


【解决方案1】:

Amazon RDS 是一种托管数据库服务。不提供对底层基础架构的访问权限。

如果您希望连接到 Amazon RDS 数据库,您需要通过其指定端口(例如 MySQL 端口 3306)将您的 SQL 客户端直接连接到数据库。 无法通过 SSH 连接。

见:Connecting to an Amazon RDS DB instance - Amazon Relational Database Service

【讨论】:

  • 我不明白这些字符,但我认为 OP 正在尝试通过 EC2 实例隧道连接到数据库端口。
猜你喜欢
  • 2021-04-17
  • 1970-01-01
  • 2014-03-31
  • 1970-01-01
  • 2022-10-14
  • 2020-10-17
  • 2018-05-12
  • 1970-01-01
  • 2021-10-14
相关资源
最近更新 更多