gpt4 book ai didi

amazon-web-services - AWS EC2 SSH : Permission denied (publickey)

转载 作者:行者123 更新时间:2023-12-02 14:22:09 25 4
gpt4 key购买 nike

我已经配置了我的 EC2 实例,并通过 SSH 连接。但是当我使用端口规则创建一个新的安全组时,我无法再通过 SSH 访问。目前,我的自定义安全组规则是:

SSH   0.0.0.0/0
HTTP 0.0.0.0/0
HTTPS 0.0.0.0/0

当我尝试 ssh -v -i bodruk.pem ubuntu@ec2-54-149-134-92.us-west-2.compute.amazonaws.com我有以下错误:
OpenSSH_6.6.1, OpenSSL 1.0.1i 6 Aug 2014
debug1: Connecting to ec2-54-149-134-92.us-west-2.compute.amazonaws.com [54.149.
134.92] port 22.
debug1: Connection established.
debug1: identity file bodruk.pem type -1
debug1: identity file bodruk.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubu
ntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH_6.6.1* compat 0x04000
000
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: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA e2:13:af:e1:1b:70:f9:70:3b:cd:1d:7f:14:de:ce:90
debug1: Host 'ec2-54-149-134-92.us-west-2.compute.amazonaws.com' is known and ma
tches the ECDSA host key.
debug1: Found key in /c/Users/Thiago/.ssh/known_hosts:2
debug1: ssh_ecdsa_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: Trying private key: bodruk.pem
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).

已经尝试过 this solution ,但不起作用。我更改了两次 key 对并删除了 known_hosts 文件,但没有成功。

任何的想法?

最佳答案

您可以使用 ssh 端口远程登录到实例吗? (远程登录“ip”“端口”)
如果可以telnet,那么问题可能出在Key Pair 或您的计算机上。如果不是,它可能与安全组和网络有关。

关于amazon-web-services - AWS EC2 SSH : Permission denied (publickey),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27384424/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com