새로운 EC2 인스턴스를 사용해도 AWS SSH 로그인이 계속 실패합니다.

새로운 EC2 인스턴스를 사용해도 AWS SSH 로그인이 계속 실패합니다.

저는 방금 AWS와 협력하여 EC2 인스턴스에 워드프레스 사이트를 만들기 시작했습니다(다음 튜토리얼 사용).https://www.youtube.com/watch?v=4WR7EFFFF04). 다른 튜토리얼을 사용하여 SSL 인증서를 추가하려고 시도하기 전까지는 모든 것이 잘 작동했습니다(지금은 찾을 수 없는 것 같습니다).

해당 단계를 수행하는 동안 너무 많은 리디렉션으로 인해 사이트가 로드되지 않는 위치로 사이트가 손상되었습니다(DNS 오류로 추정). 내가 수행한 작업을 수정하기 위해 튜토리얼을 다시 진행했을 때 이전에 아무런 문제 없이 수행했던 SSH를 통해 로그인하는 위치에 도달했고 "권한 거부됨(PublicKey)" 오류가 발생하기 시작했습니다.

그 이후로 해당 인스턴스나 다른 인스턴스에 로그인할 때 동일한 오류가 발생하지 않았습니다. 새로운 키를 사용하여 새 인스턴스를 생성해 보았지만 여전히 동일한 오류가 발생합니다.

verbose를 활성화한 상태에서 명령을 실행하면 다음과 같은 출력이 표시됩니다.

debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 47: Applying options for *
debug1: Connecting to ec2-13-59-207-225.us-east-2.compute.amazonaws.com port 22.
debug1: Connection established.
debug1: identity file /Users/bradley/Desktop/John and Rhonda Wordpress Files/keypair-2.pem type -1
debug1: identity file /Users/bradley/Desktop/John and Rhonda Wordpress Files/keypair-2.pem-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Debian-10+deb10u2
debug1: match: OpenSSH_7.9p1 Debian-10+deb10u2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to ec2-13-59-207-225.us-east-2.compute.amazonaws.com:22 as 'admin'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
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:OiIQ5QiVxQvN9lAkjLm90ynddjDDs9L75PqDAL/cTv4
debug1: Host 'ec2-13-59-207-225.us-east-2.compute.amazonaws.com' is known and matches the ECDSA host key.
debug1: Found key in /Users/bradley/.ssh/known_hosts:6
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /Users/bradley/Desktop/John and Rhonda Wordpress Files/keypair-2.pem  explicit
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/bradley/Desktop/John and Rhonda Wordpress Files/keypair-2.pem
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
[email protected]: Permission denied (publicly).

무슨 일이 일어나고 있는지 아시나요?

원래 이 질문은 주제에서 벗어난 스택 오버플로로 인해 종료되었으므로 이 질문에 대한 적절한 위치가 아닌 경우 어디에 있는지 알려주십시오. :)

관련 정보